public PropertyDefOptions(PropertyDef prop) { this.Attributes = prop.Attributes; this.Name = prop.Name; this.PropertySig = prop.PropertySig; this.Constant = prop.Constant; this.GetMethods.AddRange(prop.GetMethods); this.SetMethods.AddRange(prop.SetMethods); this.OtherMethods.AddRange(prop.OtherMethods); this.CustomAttributes.AddRange(prop.CustomAttributes); }
public PropertyDefOptions(PropertyDef prop) { Attributes = prop.Attributes; Name = prop.Name; PropertySig = prop.PropertySig; Constant = prop.Constant; GetMethods.AddRange(prop.GetMethods); SetMethods.AddRange(prop.SetMethods); OtherMethods.AddRange(prop.OtherMethods); CustomAttributes.AddRange(prop.CustomAttributes); }
/// <summary> /// Imports a <see cref="PropertySig"/> /// </summary> /// <param name="sig">The sig</param> /// <returns>The imported sig or <c>null</c> if input is invalid</returns> public PropertySig Import(PropertySig sig) { if (sig == null) { return(null); } if (!recursionCounter.Increment()) { return(null); } PropertySig result = Import(new PropertySig(sig.GetCallingConvention()), sig); recursionCounter.Decrement(); return(result); }
/// <summary> /// Constructor /// </summary> /// <param name="name">Name</param> /// <param name="sig">Property signature</param> /// <param name="flags">Flags</param> public PropertyDefUser(UTF8String name, PropertySig sig, PropertyAttributes flags) { this.name = name; this.type = sig; this.flags = flags; }
/// <summary> /// Constructor /// </summary> /// <param name="name">Name</param> /// <param name="sig">Property signature</param> public PropertyDefUser(UTF8String name, PropertySig sig) : this(name, sig, 0) { }
static PropertySig CreatePropertySig(MethodDef method, TypeSig propType, bool isGetter) { if (method == null) return null; var sig = method.MethodSig; if (sig == null) return null; var newSig = new PropertySig(sig.HasThis, propType); newSig.GenParamCount = sig.GenParamCount; int count = sig.Params.Count; if (!isGetter) count--; for (int i = 0; i < count; i++) newSig.Params.Add(sig.Params[i]); return newSig; }
PropertySig ResolveGenericArgs(PropertySig sig) { return(ResolveGenericArgs2(new PropertySig(), sig)); }
/// <summary> /// Constructor /// </summary> /// <param name="name">Name</param> /// <param name="sig">Property signature</param> /// <param name="flags">Flags</param> public PropertyDefUser(UTF8String name, PropertySig sig, PropertyAttributes flags) { this.name = name; this.type = sig; this.attributes = (int)flags; }
/// <summary> /// Returns the full name of a property sig /// </summary> /// <param name="propertySig">Property sig</param> /// <returns>Property sig full name</returns> public static string PropertySigFullName(PropertySig propertySig) { return MethodBaseSigFullName(propertySig); }
/// <summary> /// Returns the full name of a property sig /// </summary> /// <param name="propertySig">Property sig</param> /// <returns>Property sig full name</returns> public static string PropertySigFullName(PropertySig propertySig) { return MethodBaseSigFullNameSB(propertySig, null).ToString(); }