Beispiel #1
0
        public override IDictionary <string, IAnalysisSet> GetAllMembers(IModuleContext moduleContext, GetMemberOptions options = GetMemberOptions.None)
        {
            IDictionary <string, IAnalysisSet> result;

            if (options.HasFlag(GetMemberOptions.DeclaredOnly))
            {
                result = GetAllImmediateMembers(moduleContext, options);
            }
            else
            {
                result = _mro.GetAllMembers(moduleContext, options);
            }

            if (_metaclass != null)
            {
                foreach (var type in _metaclass.Types)
                {
                    if (type.Push())
                    {
                        try {
                            foreach (var nameValue in type.GetAllMembers(moduleContext))
                            {
                                result[nameValue.Key] = nameValue.Value.GetDescriptor(null, this, type, Instance.ProjectState._evalUnit);
                            }
                        } finally {
                            type.Pop();
                        }
                    }
                }
            }
            return(result);
        }
Beispiel #2
0
        public override IDictionary <string, IAnalysisSet> GetAllMembers(IModuleContext moduleContext)
        {
            var result = _mro.GetAllMembers(moduleContext);

            if (_metaclass != null)
            {
                foreach (var type in _metaclass.Types)
                {
                    if (type.Push())
                    {
                        try {
                            foreach (var nameValue in type.GetAllMembers(moduleContext))
                            {
                                result[nameValue.Key] = nameValue.Value.GetDescriptor(null, this, type, Instance.ProjectState._evalUnit);
                            }
                        } finally {
                            type.Pop();
                        }
                    }
                }
            }
            return(result);
        }