NLog.Config.ConfigurationItemFactory.RegisterType C# (CSharp) Method

RegisterType() public method

Registers the type.
public RegisterType ( Type type, string itemNamePrefix ) : void
type System.Type The type to register.
itemNamePrefix string The item name prefix.
return void
        public void RegisterType(Type type, string itemNamePrefix)
        {
            foreach (IFactory f in this.allFactories)
            {
                f.RegisterType(type, itemNamePrefix);
            }
        }

Usage Example

Ejemplo n.º 1
0
        public void CustomAgnosticTests()
        {
            var cif = new ConfigurationItemFactory();
            cif.RegisterType(typeof(CustomRendererAgnostic), string.Empty);

            Layout l = new SimpleLayout("${customAgnostic}", cif);

            l.Initialize(null);
            Assert.True(l.IsThreadAgnostic);
        }
All Usage Examples Of NLog.Config.ConfigurationItemFactory::RegisterType