示例#1
0
 public override void LoadCache()
 {
     base.LoadCache();
     _getMethod = GetMethod;
     _setMethod = SetMethod;
     _name = Name;
     _propertySig = Signature;
 }
示例#2
0
 public static MethodBody FromMethod(MethodDefinition methodDef)
 {
     MethodBody body = new MethodBody();
     body.Method = methodDef;
     body._reader = new NETMethodReader(methodDef._netheader._assembly._peImage, body);
     if (body.IsFat)
         body._reader.ReadFatMethod();
     return body;
 }
示例#3
0
 public override void LoadCache()
 {
     _method = Method;
     _association = Association;
 }
示例#4
0
 public override void ClearCache()
 {
     _getMethod = null;
     _setMethod = null;
     _name = null;
     _propertySig = null;
 }
示例#5
0
 public MethodSemantics(MethodDefinition method, MetaDataMember association, MethodSemanticsAttributes attributes)
     : base(new MetaDataRow((uint)attributes, method.TableIndex, (uint)0))
 {
     this._method = method;
     this._association = association;
 }
示例#6
0
 public override void ClearCache()
 {
     _method = null;
     _association = null;
 }
示例#7
0
 public override void LoadCache()
 {
     _reference = Reference;
 }
示例#8
0
 public override void ClearCache()
 {
     _reference = null;
 }
示例#9
0
 public override void LoadCache()
 {
     _addmethod = AddMethod;
     _removemethod = RemoveMethod;
     _name = Name;
     _eventType = EventType;
 }
示例#10
0
 public override void ClearCache()
 {
     _addmethod = null;
     _removemethod = null;
     _name = null;
     _eventType = null;
 }
示例#11
0
        public VariableDefinition[] ReadVariableSignature(uint signature, MethodDefinition parentMethod)
        {
            VariableDefinition[] variables = null;
            BlobSignatureReader reader;
            if (TryGetBlobReader(signature, parentMethod, out reader))
            {
                using (reader)
                {
                    reader.GenericContext = parentMethod;

                    byte local_sig = reader.ReadByte();

                    if (local_sig != 0x7)
                        throw new ArgumentException("Signature doesn't refer to a valid local variable signature");

                    uint count = NETGlobals.ReadCompressedUInt32(reader);

                    if (count == 0)
                        return null;

                    variables = new VariableDefinition[count];

                    for (int i = 0; i < count; i++)
                        variables[i] = new VariableDefinition(i, reader.ReadTypeReference());
                }
            }
            return variables;
        }