コード例 #1
0
        public T4CSharpCodeStructureDeclaredElement(CodeStructureElement parentElement, IDeclaration declaration, CSharpCodeStructureProcessingState state)
            : base(parentElement, declaration)
        {
            IDeclaredElement declaredElement = declaration.DeclaredElement;

            InitiallyExpanded = true;

            if (declaredElement != null && state.Options.BuildInheritanceInformation)
            {
                _inheritanceInformation = InheritanceInformation.FromDeclaredElement(declaredElement);
                if (_inheritanceInformation != null)
                {
                    var structureDeclaredElement = parentElement as T4CSharpCodeStructureDeclaredElement;
                    if (structureDeclaredElement != null)
                    {
                        structureDeclaredElement.ChildrenWithInheritance = true;
                    }
                }
            }

            _parentRegion = state.Regions.TryPeek();

            if (declaredElement != null)
            {
                _aspects = new T4CSharpCodeStructureAspects(this, declaration);
            }
        }
コード例 #2
0
 public T4CSharpCodeStructureRegion(
     [NotNull] CodeStructureElement parentElement,
     [NotNull] ITreeNode preprocessorDirective,
     [NotNull] CSharpCodeStructureProcessingState state
     )
     : base(parentElement, preprocessorDirective, state)
 {
     _parentRegion = state.Regions.TryPeek();
 }
コード例 #3
0
		public T4CSharpCodeStructureDeclaredElement(CodeStructureElement parentElement, IDeclaration declaration, CSharpCodeStructureProcessingState state)
			: base(parentElement, declaration) {
			IDeclaredElement declaredElement = declaration.DeclaredElement;
			InitiallyExpanded = true;

			if (declaredElement != null && state.Options.BuildInheritanceInformation) {
				_inheritanceInformation = InheritanceInformation.FromDeclaredElement(declaredElement);
				if (_inheritanceInformation != null) {
					var structureDeclaredElement = parentElement as T4CSharpCodeStructureDeclaredElement;
					if (structureDeclaredElement != null)
						structureDeclaredElement.ChildrenWithInheritance = true;
				}
			}

			_parentRegion = state.Regions.TryPeek();

			if (declaredElement != null)
				_aspects = new T4CSharpCodeStructureAspects(this, declaration);
		}
コード例 #4
0
		public T4CSharpCodeStructureRegionEnd(CodeStructureElement parentElement, ITreeNode preprocessorDirective, CSharpCodeStructureProcessingState state)
			: base(parentElement, preprocessorDirective) {
			_parentRegion = state.Regions.TryPeek();
		}
コード例 #5
0
 public T4CSharpCodeStructureRegionEnd(CodeStructureElement parentElement, ITreeNode preprocessorDirective, CSharpCodeStructureProcessingState state)
     : base(parentElement, preprocessorDirective)
 {
     _parentRegion = state.Regions.TryPeek();
 }