當前位置: 首頁>>代碼示例>>C#>>正文


C# AssemblyDefinition.IsSilverlight方法代碼示例

本文整理匯總了C#中Mono.Cecil.AssemblyDefinition.IsSilverlight方法的典型用法代碼示例。如果您正苦於以下問題:C# AssemblyDefinition.IsSilverlight方法的具體用法?C# AssemblyDefinition.IsSilverlight怎麽用?C# AssemblyDefinition.IsSilverlight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mono.Cecil.AssemblyDefinition的用法示例。


在下文中一共展示了AssemblyDefinition.IsSilverlight方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetRepositoryAddress

    private static string GetRepositoryAddress(AssemblyDefinition callingAssembly, AssemblyNameReference reference)
    {
      var builder = new StringBuilder();
      builder.AppendFormat("/{0}/", callingAssembly.MainModule.Architecture.ToString());
      if (reference.HasSilverlightToken() || callingAssembly.IsSilverlight())
        builder.Append("Silverlight");
      else
        builder.Append(callingAssembly.MainModule.Runtime.ToString());
      builder.AppendFormat("/assembly?name={0}", reference.Name);
      builder.AppendFormat("&version={0}", reference.Version.ToString());
      builder.AppendFormat("&token={0}", reference.GetPublicTokenKeyString());
      builder.Append("&specificversion=false");

      return builder.ToString();
    }
開發者ID:nnieslan,項目名稱:IL.View,代碼行數:15,代碼來源:RepositoryClient.cs

示例2: BrowseAssembly

    private void BrowseAssembly(object sender, RoutedEventArgs e)
    {
      var dialog = new OpenFileDialog { Filter = "Assembly Files(*.exe, *.dll)|*.exe;*.dll" };
      if (dialog.ShowDialog() == false)
      {
        Definition = null;
        DialogResult = false;
        return;
      }

      Definition = AssemblyDefinition.ReadAssembly(dialog.File.OpenRead());
      if (Definition == null) Debugger.Break();

      if (Definition.FullName == _reference.FullName)
      {
        if (Definition.IsSilverlight())
          StorageService.CacheSilverlightAssembly(dialog.File.Name, dialog.File.OpenRead());
        else
          StorageService.CacheNetAssembly(dialog.File.Name, dialog.File.OpenRead());

        ApplicationModel.Current.AssemblyCache.AddAssembly(Definition);

        DialogResult = true;
      }
    }
開發者ID:nnieslan,項目名稱:IL.View,代碼行數:25,代碼來源:AssemblyFileSelector.xaml.cs

示例3: LoadOrReplaceAssembly

 private void LoadOrReplaceAssembly(AssemblyDefinition definition, AssemblyStream source)
 {
   var assemblyView = new AssemblyNode(definition, source);
   AddOrReplaceAssemblyView(definition.IsSilverlight() ? SilverlightAssemblies : NetAssemblies, assemblyView);
 }
開發者ID:DenisVuyka,項目名稱:IL.View,代碼行數:5,代碼來源:Home.xaml.cs

示例4: UnloadAssemblyView

 private void UnloadAssemblyView(AssemblyDefinition definition)
 {
   var root = definition.IsSilverlight() ? SilverlightAssemblies : NetAssemblies;
   var view = root.Items.OfType<TreeNode>().FirstOrDefault(item => item.Component == definition);
   root.Items.Remove(view);
 }
開發者ID:DenisVuyka,項目名稱:IL.View,代碼行數:6,代碼來源:Home.xaml.cs

示例5: LoadAssembly

    private void LoadAssembly(AssemblyDefinition definition, AssemblyStream source)
    {
      var node = new AssemblyNode(definition, source);

      if (definition.IsSilverlight())
        SilverlightAssemblies.Items.Add(node);
      else
        NetAssemblies.Items.Add(node);
    }
開發者ID:DenisVuyka,項目名稱:IL.View,代碼行數:9,代碼來源:Home.xaml.cs

示例6: LoadOrReplaceAssembly

    private void LoadOrReplaceAssembly(AssemblyDefinition definition)
    {
      var assemblyView = new AssemblyNode(definition);

      if (definition.IsSilverlight())
        AddOrReplaceAssemblyView(SilverlightAssemblies, assemblyView);
      else
        AddOrReplaceAssemblyView(NetAssemblies, assemblyView);
    }
開發者ID:nnieslan,項目名稱:IL.View,代碼行數:9,代碼來源:Home.xaml.cs


注:本文中的Mono.Cecil.AssemblyDefinition.IsSilverlight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。