问题描述
我需要更新 sitefinity Telerik.Sitefinity.Frontend.Lists dll(版本 10.1.6544)。
当我通过 JustDecomplile Tool 反编译这个 dll 时,我得到了 tpye 错误
typeof(Tuple).Create 文件 \SitefinityFrontendLists\Sitefinity.Frontend.Lists\MVC.Views.Lists\List_AnchorList.cs
请检查此问题并提出反编译和更新sitefinity dll的方法
using Microsoft.CSharp.RuntimeBinder;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Web.Mvc;
using System.Web.WebPages;
using System.Web.WebPages.Instrumentation;
using Telerik.Sitefinity.Frontend.Lists.Mvc.Models;
using Telerik.Sitefinity.Frontend.Mvc.Helpers;
using Telerik.Sitefinity.Frontend.Mvc.Models;
namespace Telerik.Sitefinity.Frontend.Lists.MVC.Views.Lists
{
[GeneratedCode("RazorGenerator","2.0.0.0")]
[PageVirtualPath("~/MVC/Views/Lists/List.AnchorList.cshtml")]
public class List_AnchorList : WebViewPage<ContentListviewmodel>
{
public List_AnchorList()
{
}
public override void Execute()
{
this.WriteLiteral("\n<div");
PositionTagged<string> positionTagged = Tuple.Create<string,int>(" class=\"",194);
PositionTagged<string> positionTagged1 = Tuple.Create<string,int>("\"",217);
AttributeValue[] attributeValueArray = new AttributeValue[] { Tuple.Create<Tuple<string,int>,Tuple<object,bool>(Tuple.Create<string,int>("",202),Tuple.Create<object,int>(base.Model.CssClass,false) };
this.WriteAttribute("class",positionTagged,positionTagged1,attributeValueArray);
this.WriteLiteral(">\n\n");
foreach (Itemviewmodel item in base.Model.Items)
{
this.WriteLiteral(" <h1 ");
this.Write(base.Html.InlineEditingAttributes(base.Model.ProviderName,base.Model.ContentType.FullName,(Guid)((dynamic)item.Fields).Id));
this.WriteLiteral(">\n <a");
this.WriteAttribute("id",Tuple.Create<string,int>(" id=\"",393),417),typeof(Tuple).Create(Tuple.Create<string,398),typeof(Tuple).Create<object,int>(((dynamic)item.Fields).Id,false),Tuple.Create<Tuple<string,Tuple<string,413),int>("-Top",true));
this.WriteLiteral("\n ");
this.Write(base.Html.InlineEditingFieldAttributes("Title","ShortText"));
this.WriteLiteral("\n href=\"#");
this.Write(((dynamic)item.Fields).Id);
this.WriteLiteral("\">");
this.Write(((dynamic)item.Fields).Title);
this.WriteLiteral("</a>\n </h1>\n");
this.WriteLiteral(" <ul>\n");
foreach (Itemviewmodel itemviewmodel in ((Listviewmodel)item).ListItemviewmodel.Items)
{
this.WriteLiteral(" <li ");
this.Write(base.Html.InlineEditingAttributes(base.Model.ProviderName,((Listviewmodel)item).ListItemviewmodel.ContentType.FullName,(Guid)((dynamic)itemviewmodel.Fields).Id));
this.WriteLiteral(">\n <a ");
this.Write(base.Html.InlineEditingFieldAttributes("Title","ShortText"));
this.WriteLiteral("\n href=\"#");
this.Write(((dynamic)itemviewmodel.Fields).Id);
this.WriteLiteral("\">");
this.Write(((dynamic)itemviewmodel.Fields).Title);
this.WriteLiteral("</a>\n </li>\n");
}
this.WriteLiteral(" </ul>\n");
}
this.WriteLiteral("\n");
foreach (Itemviewmodel item1 in base.Model.Items)
{
this.WriteLiteral(" <h1 ");
this.Write(base.Html.InlineEditingAttributes(base.Model.ProviderName,(Guid)((dynamic)item1.Fields).Id));
this.WriteLiteral("\n");
this.WriteLiteral(" ");
this.Write(base.Html.InlineEditingFieldAttributes("Title","ShortText"));
this.WriteLiteral("\n id=\"");
this.Write(((dynamic)item1.Fields).Id);
this.WriteLiteral("\">\n");
this.WriteLiteral(" ");
this.Write(((dynamic)item1.Fields).Title);
this.WriteLiteral("\n </h1>\n");
foreach (Itemviewmodel itemviewmodel1 in ((Listviewmodel)item1).ListItemviewmodel.Items)
{
this.WriteLiteral(" <div ");
this.Write(base.Html.InlineEditingAttributes(base.Model.ProviderName,((Listviewmodel)item1).ListItemviewmodel.ContentType.FullName,(Guid)((dynamic)itemviewmodel1.Fields).Id));
this.WriteLiteral(">\n <h3 ");
this.Write(base.Html.InlineEditingFieldAttributes("Title","ShortText"));
this.WriteLiteral("\n id=\"");
this.Write(((dynamic)itemviewmodel1.Fields).Id);
this.WriteLiteral("\">\n");
this.WriteLiteral(" ");
this.Write(((dynamic)itemviewmodel1.Fields).Title);
this.WriteLiteral("\n </h3>\n\n <div ");
this.Write(base.Html.InlineEditingFieldAttributes("Content","LongText"));
this.WriteLiteral(">");
this.Write(base.Html.Raw(((dynamic)itemviewmodel1.Fields).Content));
this.WriteLiteral("</div>\n\n <p><a");
this.WriteAttribute("href",int>(" href=\"",1937),1964),1944),int>("#",true),1945),int>(((dynamic)item1.Fields).Id,1960),true));
this.WriteLiteral(">");
this.Write(base.Html.Resource("BackToTop",false));
this.WriteLiteral("</a></p>\n </div>\n");
}
}
this.WriteLiteral("\n</div>\n");
}
}
}
解决方法
我不知道你为什么需要反编译任何东西。 JustDecompile 确实做得很好。但是这些程序集也可以在 GitHub 上找到。 https://github.com/Sitefinity/feather-widgets