コード例 #1
0
        internal IEnumerable <FunctionValue> ResolveMethod(MemoryEntry thisObject, QualifiedName methodName)
        {
            var result = new List <FunctionValue>();

            foreach (var possibleValue in thisObject.PossibleValues)
            {
                var objectValue = possibleValue as ObjectValue;

                TypeValue type;
                IEnumerable <FunctionValue> objectMethods;
                if (objectValue == null)
                {
                    type          = null;
                    objectMethods = new FunctionValue[0];
                }
                else
                {
                    type          = objectType(objectValue);
                    objectMethods = TypeMethodResolver.ResolveMethods(type, this);
                }

                var resolvedMethods = MemoryAssistant.ResolveMethods(possibleValue, type, methodName, objectMethods);
                result.AddRange(resolvedMethods);
            }

            return(result);
        }
コード例 #2
0
        internal static IEnumerable <FunctionValue> ResolveMethods(TypeValue type, SnapshotBase snapshot)
        {
            var resolver = new TypeMethodResolver(snapshot);

            type.Accept(resolver);

            return(resolver._methods);
        }
コード例 #3
0
        /// <summary>
        /// Resolves the static method.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <param name="methodName">Name of the method.</param>
        /// <returns>Resolved methods</returns>
        protected override IEnumerable <FunctionValue> resolveStaticMethod(TypeValue value, QualifiedName methodName)
        {
            List <FunctionValue>        result = new List <FunctionValue>();
            IEnumerable <FunctionValue> objectMethods;

            objectMethods = TypeMethodResolver.ResolveMethods(value, this);

            var resolvedMethods = MemoryAssistant.ResolveMethods(value, methodName, objectMethods);

            result.AddRange(resolvedMethods);

            return(result);
        }