Esempio n. 1
0
 public override void LoadCache()
 {
     base.LoadCache();
     _getMethod = GetMethod;
     _setMethod = SetMethod;
     _name = Name;
     _propertySig = Signature;
 }
Esempio n. 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;
 }
Esempio n. 3
0
 public override void LoadCache()
 {
     _method = Method;
     _association = Association;
 }
Esempio n. 4
0
 public override void ClearCache()
 {
     _getMethod = null;
     _setMethod = null;
     _name = null;
     _propertySig = null;
 }
Esempio n. 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;
 }
Esempio n. 6
0
 public override void ClearCache()
 {
     _method = null;
     _association = null;
 }
Esempio n. 7
0
 public override void LoadCache()
 {
     _reference = Reference;
 }
Esempio n. 8
0
 public override void ClearCache()
 {
     _reference = null;
 }
Esempio n. 9
0
 public override void LoadCache()
 {
     _addmethod = AddMethod;
     _removemethod = RemoveMethod;
     _name = Name;
     _eventType = EventType;
 }
Esempio n. 10
0
 public override void ClearCache()
 {
     _addmethod = null;
     _removemethod = null;
     _name = null;
     _eventType = null;
 }
Esempio n. 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;
        }