示例#1
0
        public override void Visit(IAssembly assembly)
        {
            _declarationWriter.ModuleNullableContextValue = assembly.ModuleAttributes.GetCustomAttributeArgumentValue <byte?>(CSharpCciExtensions.NullableContextAttributeFullName);

            if (_writeAssemblyAttributes)
            {
                _declarationWriter.WriteDeclaration(assembly);
            }

            var namespaces = assembly.GetAllNamespaces();

            _currentTypeListFilter = null;

            // first pass, visit types *not* mentioned in ConditionalTypeLists
            WriteConditionStart(DefaultCondition);
            Visit(namespaces);
            WriteConditionEnd(DefaultCondition);

            // second pass, visit types mentioned in ConditionalTypeLists
            foreach (var typeList in ConditionalTypeLists ?? Enumerable.Empty <ConditionalTypeList>())
            {
                _currentTypeListFilter = typeList.Filter;

                WriteConditionStart(typeList.Symbol);
                Visit(namespaces.Where(_currentTypeListFilter.Include));
                WriteConditionEnd(typeList.Symbol);
            }
        }
 public virtual void Visit(IAssembly assembly)
 {
     Visit(assembly.GetAllNamespaces());
 }
 public virtual void Visit(IAssembly assembly)
 {
     Visit(assembly.GetAllNamespaces());
 }