Inheritance: AbstractLoggerFactory
コード例 #1
0
		public static void SetLoggerFactory(ILoggerFactory loggerFactory)
		{
			if (loggerFactory == null)
			{
				loggerFactory = new NullLogFactory();
			}
			_loggerFactory = loggerFactory;
		}
コード例 #2
0
        internal static IContainer BuildContainer()
        {
            var storageAccount = CloudStorageAccount.Parse(AzureRoleEnvironment.GetConfigurationSettingValue("DataConnectionString"));
            var logFactory = new NullLogFactory();
            const LoggerLevel logLevel = LoggerLevel.Off;

            var builder = new ContainerBuilder();
            Register(builder, storageAccount, logFactory, logLevel);
            builder.RegisterControllers(typeof (ContainerConfig).Assembly);
            var container = builder.Build();
            DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
            return container;
        }