コード例 #1
0
ファイル: FieldDef.cs プロジェクト: petterlopes/ConfuserEx
 /// <summary>
 /// Gets the size of this field in bytes or <c>0</c> if unknown.
 /// </summary>
 /// <param name="declaringType">The declaring type of <c>this</c></param>
 /// <param name="fieldSig">The field signature of <c>this</c></param>
 /// <param name="size">Updated with size</param>
 /// <returns><c>true</c> if <paramref name="size"/> is valid, <c>false</c> otherwise</returns>
 protected bool GetFieldSize(TypeDef declaringType, FieldSig fieldSig, out uint size)
 {
     return(GetFieldSize(declaringType, fieldSig, GetPointerSize(declaringType), out size));
 }
コード例 #2
0
ファイル: FieldDef.cs プロジェクト: petterlopes/ConfuserEx
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name">Name</param>
 /// <param name="signature">Signature</param>
 /// <param name="attributes">Flags</param>
 public FieldDefUser(UTF8String name, FieldSig signature, FieldAttributes attributes)
 {
     this.name       = name;
     this.signature  = signature;
     this.attributes = (int)attributes;
 }
コード例 #3
0
ファイル: FieldDef.cs プロジェクト: petterlopes/ConfuserEx
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name">Name</param>
 /// <param name="signature">Signature</param>
 public FieldDefUser(UTF8String name, FieldSig signature)
     : this(name, signature, 0)
 {
 }
コード例 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="module">Owner module</param>
 /// <param name="name">Name of field ref</param>
 /// <param name="sig">Field sig</param>
 public MemberRefUser(ModuleDef module, UTF8String name, FieldSig sig)
     : this(module, name, sig, null)
 {
 }
コード例 #5
0
 /// <summary>
 /// Gets the field type
 /// </summary>
 /// <param name="sig">this</param>
 /// <returns>Field type or <c>null</c> if none</returns>
 public static TypeSig GetFieldType(this FieldSig sig)
 {
     return(sig == null ? null : sig.Type);
 }
コード例 #6
0
ファイル: TypeHelper.cs プロジェクト: petterlopes/ConfuserEx
 /// <summary>
 /// Checks whether <paramref name="fieldSig"/> contains a <see cref="GenericVar"/> or a
 /// <see cref="GenericMVar"/>.
 /// </summary>
 /// <param name="fieldSig">Field signature</param>
 /// <returns><c>true</c> if <paramref name="fieldSig"/> contains a <see cref="GenericVar"/>
 /// or a <see cref="GenericMVar"/>.</returns>
 public static bool ContainsGenericParameter(FieldSig fieldSig)
 {
     return(new TypeHelper().ContainsGenericParameterInternal(fieldSig));
 }