private string GetSummrytxt(ShapeElement parentShape) { ClrInterface interface2 = this.GetClass(parentShape); if (interface2 == null) { return("(无摘要)"); } if (string.IsNullOrEmpty(interface2.DocSummary)) { return("(无摘要)"); } return(interface2.DocSummary); }
/// <summary> /// Equals override. /// </summary> /// <param name="obj">Object to compare to.</param> /// <returns>True if this interface equals another.</returns> public override bool Equals(object obj) { if (obj == null || !(obj is ClrInterface)) { return(false); } ClrInterface rhs = (ClrInterface)obj; if (Name != rhs.Name) { return(false); } if (BaseInterface == null) { return(rhs.BaseInterface == null); } return(BaseInterface.Equals(rhs.BaseInterface)); }
private ClrInterface?GetInterface(MetadataImport import, int mdIFace) { ClrInterface?result = null; if (!import.GetTypeDefProperties(mdIFace, out string?name, out _, out int extends).IsOK) { name = import.GetTypeRefName(mdIFace); } // TODO: Handle typespec case. if (name != null) { ClrInterface?type = null; if (extends != 0 && extends != 0x01000000) { type = GetInterface(import, extends); } result = new ClrInterface(name, type); } return(result); }
private ClrInterface GetInterface(MetaDataImport import, int mdIFace) { ClrInterface result = null; if (!import.GetTypeDefProperties(mdIFace, out string name, out TypeAttributes attrs, out int extends)) { name = import.GetTypeRefName(mdIFace); } // TODO: Handle typespec case. if (name != null && !DesktopHeap.Interfaces.TryGetValue(name, out result)) { ClrInterface type = null; if (extends != 0 && extends != 0x01000000) { type = GetInterface(import, extends); } result = new DesktopHeapInterface(name, type); DesktopHeap.Interfaces[name] = result; } return(result); }
public DesktopHeapInterface(string name, ClrInterface baseInterface) { _name = name; _base = baseInterface; }
public InterfaceInformation(ClrDump clrDump, ClrInterface interf) { TypeName = TypeHelpers.ManageAlias(interf.Name); ClrDump = clrDump; ClrInterface = interf; }
public DummyTypeInformation(ClrInterface interf) { this.interf = interf; TypeName = interf.Name; }
public DesktopHeapInterface(string name, ClrInterface baseInterface) { _name = name; _base = baseInterface; }
public StructuredType CreateFromClrInterface(ClrInterface type) { return(CreateFromTypeName(type.Name)); }
public MDInterface(ClrInterface heapint) { m_heapint = heapint; }
/// <summary> /// Determines whether the adapted type conforms to a specified interface /// </summary> /// <param name="i">The interface to test</param> /// <returns></returns> public bool Realizes(ClrInterface i) => ReflectedElement.Realizes(i.ReflectedElement);
/// <summary> /// Initializes a new instance of the <see cref="ClrInterfaceAdapter" /> class. /// </summary> /// <param name="interface">The interface.</param> /// <exception cref="ArgumentNullException">interface</exception> /// <inheritdoc /> public ClrInterfaceAdapter(IConverter converter, ClrInterface @interface) : base(converter) { Interface = @interface ?? throw new ArgumentNullException(nameof(@interface)); Name = Interface.Name; }