• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AssemblyRef类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AssemblyRef的典型用法代码示例。如果您正苦于以下问题:C# AssemblyRef类的具体用法?C# AssemblyRef怎么用?C# AssemblyRef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AssemblyRef类属于命名空间,在下文中一共展示了AssemblyRef类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TypeRef

    private TypeRef([NotNull] string typeName, [CanBeNull] AssemblyRef assembly)
    {
      Assert.ArgumentNotNull(typeName, "typeName");

      TypeName = typeName;
      Assembly = assembly ?? AssemblyRef.Empty;
    }
开发者ID:Sitecore,项目名称:Sitecore.Diagnostics.SmoDataProvider,代码行数:7,代码来源:TypeRef.cs


示例2: Csvm

		public Csvm(IDeobfuscatorContext deobfuscatorContext, ModuleDefMD module, Csvm oldOne) {
			this.deobfuscatorContext = deobfuscatorContext;
			this.module = module;
			if (oldOne.resource != null)
				this.resource = (EmbeddedResource)module.Resources[oldOne.module.Resources.IndexOf(oldOne.resource)];
			if (oldOne.vmAssemblyRef != null)
				this.vmAssemblyRef = module.ResolveAssemblyRef(oldOne.vmAssemblyRef.Rid);
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:8,代码来源:Csvm.cs


示例3: AssemblyReferenceNodeImpl

		public AssemblyReferenceNodeImpl(ITreeNodeGroup treeNodeGroup, ModuleDef asmRefOwnerModule, AssemblyRef assemblyRef) {
			TreeNodeGroup = treeNodeGroup;
			this.asmRefOwnerModule = new WeakReference(asmRefOwnerModule);
			// Make sure we don't hold on to the original reference since it could prevent GC of the
			// owner module.
			AssemblyRef = assemblyRef.ToAssemblyRef();
			AssemblyRef.Rid = assemblyRef.Rid;
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:8,代码来源:AssemblyReferenceNodeImpl.cs


示例4: FindOrCreateTypeRef

 public TypeDefOrRefSig FindOrCreateTypeRef(ModuleDef module, AssemblyRef asmRef, string ns, string name, bool isValueType)
 {
     var typeRef = module.UpdateRowId(new TypeRefUser(module, ns, name, asmRef));
     if (isValueType)
         return new ValueTypeSig(typeRef);
     
     return new ClassSig(typeRef);
 }
开发者ID:Virility,项目名称:SplashCreator,代码行数:8,代码来源:InitializedDataCreator.cs


示例5: GetModule

		static MModule GetModule(AssemblyRef asmRef) {
			foreach (var mm in modules.Values) {
				var asm = mm.moduleDef.Assembly;
				if (asm != null && asm.FullName == asmRef.FullName)
					return mm;
			}
			return null;
		}
开发者ID:GodLesZ,项目名称:de4dot,代码行数:8,代码来源:Resolver.cs


示例6: OverwriteAssembly

		static void OverwriteAssembly(AssemblyRef dst, AssemblyRef src) {
			dst.Name = src.Name;
			dst.Version = src.Version;
			dst.PublicKeyOrToken = src.PublicKeyOrToken;
			dst.Culture = src.Culture;
			dst.Attributes = src.Attributes;
			dst.Hash = src.Hash;
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:8,代码来源:ModuleUtils.cs


示例7: AssemblyReferenceTreeNode

 public AssemblyReferenceTreeNode(AssemblyRef r, AssemblyTreeNode parentAssembly)
 {
     if (parentAssembly == null)
         throw new ArgumentNullException("parentAssembly");
     if (r == null)
         throw new ArgumentNullException("r");
     this.r = r;
     this.parentAssembly = parentAssembly;
     this.LazyLoading = true;
 }
开发者ID:jorik041,项目名称:dnSpy-retired,代码行数:10,代码来源:AssemblyReferenceTreeNode.cs


示例8: AssemblyReferenceTreeNode

		internal AssemblyReferenceTreeNode(AssemblyRef r, AssemblyTreeNode parentAssembly, DnSpyFileListTreeNode dnSpyFileListTreeNode) {
			if (parentAssembly == null)
				throw new ArgumentNullException("parentAssembly");
			if (dnSpyFileListTreeNode == null)
				throw new ArgumentNullException("dnSpyFileListTreeNode");
			if (r == null)
				throw new ArgumentNullException("r");
			this.r = r;
			this.dnSpyFileListTreeNode = dnSpyFileListTreeNode;
			this.parentAssembly = parentAssembly;
			this.LazyLoading = true;
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:12,代码来源:AssemblyReferenceTreeNode.cs


示例9: LoadSymbolWriter

		private ISymbolWriter LoadSymbolWriter(AssemblyDefinition assembly, AssemblyRef output)
		{
			// TODO: Get symbol writing to work.
//			ISymbolWriterProvider symProv = null;
//			if (this.usingMdb) {
//				symProv = new Mono.Cecil.Mdb.MdbWriterProvider ();
//			} else if (this.usingPdb) {
//				symProv = new Mono.Cecil.Pdb.PdbWriterProvider ();
//			} else {
//				this.warnings.Add ("-writePDBFile specified, but no symbol file found, cannot write symbols.");
//			}
//			if (symProv != null) {
//				return output.IsFilename ?
//					symProv.GetSymbolWriter (assembly.MainModule, output.Filename) :
//					symProv.GetSymbolWriter (assembly.MainModule, output.Streams.Symbols);
//			}
			return null;
		}
开发者ID:afaerber,项目名称:mono,代码行数:18,代码来源:Rewriter.cs


示例10: IsAssemblyRef

 static bool IsAssemblyRef(AssemblyRef asmRef, UTF8String name, PublicKeyToken token)
 {
     if (asmRef.Name != name)
         return false;
     var pkot = asmRef.PublicKeyOrToken;
     if (pkot == null)
         return false;
     return token.Equals(pkot.Token);
 }
开发者ID:0xd4d,项目名称:dnlib,代码行数:9,代码来源:ModuleDefMD.cs


示例11: AddExternAssembly

 /// <summary>
 /// Add an external assembly to this PEFile (.assembly extern)
 /// </summary>
 /// <param name="assemName">the external assembly name</param>
 /// <returns>a descriptor for this external assembly</returns>
 public AssemblyRef AddExternAssembly(string assemName) {
   if (assemName.CompareTo(mscorlibName) == 0) return metaData.mscorlib;
   AssemblyRef anAssem = new AssemblyRef(metaData,assemName);
   metaData.AddToTable(MDTable.AssemblyRef,anAssem);
   // Console.WriteLine("Adding assembly " + assemName);
   return anAssem;
 }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:12,代码来源:PEAPI.cs


示例12: AddExternalManagedResource

 /// <summary>
 /// Add a managed resource from another assembly.
 /// </summary>
 /// <param name="resName">The name of the resource</param>
 /// <param name="assem">The assembly where the resource is</param>
 /// <param name="isPublic">Access for the resource</param>
 public void AddExternalManagedResource (string resName, AssemblyRef assem, uint flags) {
   resources.Add (new ManifestResource (resName, flags, assem));
 }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:9,代码来源:PEAPI.cs


示例13: Type

		public ClassSig Type(string ns, string name, AssemblyRef asmRef) {
			return (ClassSig)Type(false, ns, name, asmRef);
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:3,代码来源:MemberReferenceBuilder.cs


示例14: Write

 public void Write(ISyntaxHighlightOutput output, ILanguage language, AssemblyRef asmRef, bool showToken)
 {
     output.Write(NameUtils.CleanIdentifier(asmRef.Name), TextTokenKind.Text);
     WriteToken(output, asmRef, showToken);
 }
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:5,代码来源:NodePrinter.cs


示例15: Find

		public void Find() {
			resource = FindCsvmResource();
			vmAssemblyRef = FindVmAssemblyRef();
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:4,代码来源:Csvm.cs


示例16: AssemblyLinkedResource

		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="name">Name of resource</param>
		/// <param name="asmRef">Assembly reference</param>
		/// <param name="flags">Resource flags</param>
		public AssemblyLinkedResource(UTF8String name, AssemblyRef asmRef, ManifestResourceAttributes flags)
			: base(name, flags) {
			if (asmRef == null)
				throw new ArgumentNullException("asmRef");
			this.asmRef = asmRef;
		}
开发者ID:EmilZhou,项目名称:dnlib,代码行数:12,代码来源:Resource.cs


示例17: TypeRef

 /// <summary>
 /// Initializes a new instance of the <see cref="TypeRef"/> class.
 /// </summary>
 /// <param name="assembly">The belonging assembly of this type reference, or <c>null</c> if it is mscorlib.</param>
 /// <param name="name">The value of <see cref="Type.FullName"/>, or <c>null</c> if referring type is <see cref="Object"/>.</param>
 public TypeRef(AssemblyRef assembly, String name)
     : this()
 {
     this.Assembly = assembly;
     this.Name = name;
 }
开发者ID:takeshik,项目名称:yacq,代码行数:11,代码来源:TypeRef.cs


示例18: ManifestResource

		public ManifestResource(string name, uint flags, AssemblyRef assemRef) 
		{
			InitResource (name, flags);
			rRef = assemRef;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:5,代码来源:Metadata.cs


示例19: ReadAssemblyRef

 internal static AssemblyRef ReadAssemblyRef(PEReader buff)
 {
     buff.SetElementPosition(MDTable.Assembly, 1);
     HashAlgorithmType hAlg = (HashAlgorithmType)buff.ReadUInt32();
     ushort majVer = buff.ReadUInt16();
     ushort minVer = buff.ReadUInt16();
     ushort bldNo = buff.ReadUInt16();
     ushort revNo = buff.ReadUInt16();
     uint flags = buff.ReadUInt32();
     byte[] pKey = buff.GetBlob();
     string name = buff.GetString();
     string cult = buff.GetString();
     AssemblyRef assemRef;
     if (name.ToLower() == "mscorlib")
     {
         assemRef = MSCorLib.mscorlib;
         assemRef.AddVersionInfo(majVer, minVer, bldNo, revNo);
         if (pKey.Length > 8) assemRef.AddKey(pKey);
         else assemRef.AddKeyToken(pKey);
         assemRef.AddCulture(cult);
         assemRef.SetFlags(flags);
     }
     else
     {
         assemRef = new AssemblyRef(name, majVer, minVer, bldNo, revNo, flags, pKey, cult, null);
     }
     //AssemblyRef assemRef = new AssemblyRef(name,majVer,minVer,bldNo,revNo,flags,pKey,cult,null);
     assemRef.ReadAsDef();
     return assemRef;
 }
开发者ID:dbremner,项目名称:perwapi,代码行数:30,代码来源:MDDefScopeElems.cs


示例20: MakeRefOf

 /// <summary>
 /// Make an AssemblyRef descriptor for this Assembly
 /// </summary>
 /// <returns>AssemblyRef descriptor for this Assembly</returns>
 public AssemblyRef MakeRefOf()
 {
     if (refOf == null)
     {
         refOf = new AssemblyRef(name, majorVer, minorVer, buildNo, revisionNo,
             flags, publicKey, culture, null);
     }
     return refOf;
 }
开发者ID:dbremner,项目名称:perwapi,代码行数:13,代码来源:MDDefScopeElems.cs



注:本文中的AssemblyRef类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AssemblyResolver类代码示例发布时间:2022-05-24
下一篇:
C# AssemblyNode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap