当前位置: 首页>>代码示例>>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;未经允许,请勿转载。