本文整理汇总了C#中AssemblyRef类的典型用法代码示例。如果您正苦于以下问题:C# AssemblyRef类的具体用法?C# AssemblyRef怎么用?C# AssemblyRef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AssemblyRef类属于命名空间,在下文中一共展示了AssemblyRef类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TypeRef
private TypeRef([NotNull] string typeName, [CanBeNull] AssemblyRef assembly)
{
Assert.ArgumentNotNull(typeName, "typeName");
TypeName = typeName;
Assembly = assembly ?? AssemblyRef.Empty;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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));
}
示例13: Type
public ClassSig Type(string ns, string name, AssemblyRef asmRef) {
return (ClassSig)Type(false, ns, name, asmRef);
}
示例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);
}
示例15: Find
public void Find() {
resource = FindCsvmResource();
vmAssemblyRef = FindVmAssemblyRef();
}