Source/NFX/Inventorization/InventorizationManager.cs
/// <summary>
/// Runs inventorization routine dumping result into config node
/// </summary>
Runs inventorization routine dumping result into config node
Runs inventorization routine dumping result into config node
public void Run(ConfigSectionNode root)
       {
          if (m_Startegies.Count==0)
           throw new InventorizationException(StringConsts.INVENTORIZATION_NEED_STRATEGY_ERROR);
          foreach(var asm in m_Assemblies.Where(a => filter(a)))
          {
            var asmnode = root.AddChildNode("assembly");
            asmnode.AddAttributeNode("name", asm.FullName);
            WriteInventoryAttributes(asm.GetCustomAttributes(typeof(InventoryAttribute), false).Cast<InventoryAttribute>(),
                                     asmnode.AddChildNode(ATTRIBUTES_NODE));
            var types = asm.GetTypes();
            foreach(var type in types.Where(t => filter(t)).OrderBy(t => t.FullName))
            {
             var tnode = asmnode.AddChildNode("type");
             tnode.AddAttributeNode("ns", type.Namespace);
             tnode.AddAttributeNode("name", type.Name);
             foreach(var strategy in m_Startegies)
                strategy.Inventorize(type, tnode);
            }
          }
       }
public void Run ( ConfigSectionNode root ) { if ( m_Startegies . Count == 0 ) throw new InventorizationException ( StringConsts . INVENTORIZATION_NEED_STRATEGY_ERROR ) ; foreach ( var asm in m_Assemblies . Where ( a => filter ( a ) ) ) { var asmnode = root . AddChildNode ( " " ) ; asmnode . AddAttributeNode ( " " , asm . FullName ) ; WriteInventoryAttributes ( asm . GetCustomAttributes ( typeof ( InventoryAttribute ) , false ) . Cast < InventoryAttribute > ( ) , asmnode . AddChildNode ( ATTRIBUTES_NODE ) ) ; var types = asm . GetTypes ( ) ; foreach ( var type in types . Where ( t => filter ( t ) ) . OrderBy ( t => t . FullName ) ) { var tnode = asmnode . AddChildNode ( " " ) ; tnode . AddAttributeNode ( " " , type . Namespace ) ; tnode . AddAttributeNode ( " " , type . Name ) ; foreach ( var strategy in m_Startegies ) strategy . Inventorize ( type , tnode ) ; } } }
Runs inventorization routine dumping result into config node
Runs inventorization routine dumping result into config node
root
ConfigSectionNode