public static string ToString(this IModuleSignature moduleSig, SignaturePrintingFlags flags = SignaturePrintingFlags.None) { var printer = new SignaturePrinter(flags); printer.PrintModule(moduleSig); return(printer.ToString()); }
public int GetHashCode(IModuleSignature obj) { int hashCode = 0x5000; if (obj.Name != null) { hashCode ^= obj.Name.GetHashCode(); } return(hashCode); }
public IModule Resolve(IModuleSignature moduleSig, IModule context, bool throwOnFailure = false) { var module = ResolveModule(moduleSig, context); if (module == null) { if (throwOnFailure) { throw new ResolveReferenceException(string.Format(SR.ModuleResolveError, moduleSig.ToString())); } return(null); } return(module); }
private bool EqualsTypeOwner(IAssemblySignature x, IModuleSignature y, IModule yModule) { if (!yModule.IsPrimeModule) { return(false); } if (y.Name != yModule.Name) { return(false); } if (!EqualsAssembly(x, (IAssemblySignature)yModule.Assembly)) { return(false); } return(true); }
public bool Equals(IModuleSignature x, IModuleSignature y) { if (x == y) { return(true); } if (x == null || y == null) { return(false); } if (x.Name != y.Name) { return(false); } return(true); }
public static IModule Resolve(this IModuleSignature moduleSig, IModule context, bool throwOnFailure = false) { return(context.AssemblyManager.Resolve(moduleSig, context, throwOnFailure)); }
private void WriteModule(ref int pos, IModuleSignature module) { _blob.Write(ref pos, (byte)SignatureType.Module); WriteString(ref pos, module.Name); }
public void PrintModule(IModuleSignature moduleSig) { PrintModule(moduleSig.Name); }
protected IModule ResolveModule(IModuleSignature moduleSig, IModule context) { return(context.Assembly.GetModule(moduleSig.Name)); }