Пример #1
0
        internal static IEnumerator Create(
            CodeModelState state,
            ProjectId projectId,
            SymbolKey namespaceSymbolId
            )
        {
            var newEnumerator = new ExternalNamespaceEnumerator(
                state,
                projectId,
                namespaceSymbolId
                );

            return((IEnumerator)ComAggregate.CreateAggregatedObject(newEnumerator));
        }
        private ImmutableArray <EnvDTE.CodeElement> GetChildren()
        {
            if (_children == null)
            {
                var childrenBuilder = ArrayBuilder <EnvDTE.CodeElement> .GetInstance();

                foreach (var child in ExternalNamespaceEnumerator.ChildrenOfNamespace(this.State, _projectId, _namespaceSymbolId))
                {
                    childrenBuilder.Add(child);
                }

                _children = childrenBuilder.ToImmutableAndFree();
            }

            return(_children);
        }
 public override System.Collections.IEnumerator GetEnumerator()
 => ExternalNamespaceEnumerator.Create(this.State, _projectId, _namespaceSymbolId);
 internal static IEnumerator Create(CodeModelState state, ProjectId projectId, SymbolKey namespaceSymbolId)
 {
     var newEnumerator = new ExternalNamespaceEnumerator(state, projectId, namespaceSymbolId);
     return (IEnumerator)ComAggregate.CreateAggregatedObject(newEnumerator);
 }