Пример #1
0
        internal Location(VirtualMachine virtualMachine, Method method, long codeIndex, int lineNumber)
            : this(virtualMachine, method, codeIndex)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires(method != null);

            _lineNumber = lineNumber;
        }
Пример #2
0
        internal Location(VirtualMachine virtualMachine, Method method, long codeIndex)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires<ArgumentNullException>(method != null, "method");

            _method = method;
            _codeIndex = codeIndex;
        }
Пример #3
0
        public LocalVariable(VirtualMachine virtualMachine, Method method, Types.VariableData variableData)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires<ArgumentNullException>(method != null, "method");

            _method = method;
            _variableData = variableData;
        }
Пример #4
0
        internal LocalVariable GetMirrorOf(Method method, Types.VariableData variableData)
        {
            ulong codeIndex = variableData.CodeIndex;
            uint length = variableData.Length;

            string name = variableData.Name;
            string signature = variableData.Signature;
            string genericSignature = variableData.GenericSignature;

            int slot = variableData.Slot;

            return new LocalVariable(this, method, variableData);
        }
Пример #5
0
 internal Location GetMirrorOf(Method method, Types.LineNumberData lineNumberData)
 {
     return new Location(this, method, lineNumberData.LineCodeIndex, lineNumberData.LineNumber);
 }
Пример #6
0
        internal Method GetMirrorOf(ReferenceType declaringType, DeclaredMethodData methodData)
        {
            lock (_methods)
            {
                List<Method> methods;
                if (!_methods.TryGetValue(declaringType.ReferenceTypeId, out methods))
                {
                    methods = new List<Method>();
                    _methods[declaringType.ReferenceTypeId] = methods;
                }

                Method method = methods.SingleOrDefault(i => i.MethodId == methodData.MethodId);
                if (method == null)
                {
                    method = new Method(this, declaringType, methodData.Name, methodData.Signature, methodData.GenericSignature, (AccessModifiers)methodData.Modifiers, methodData.MethodId);
                    methods.Add(method);
                }

                return method;
            }
        }