Beispiel #1
0
        public static DependableConfiguration UseAutofacDependencyResolver(
            this DependableConfiguration configuration,
            ILifetimeScope container)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }

            return(configuration.UseDependencyResolver(new AutofacDependencyResolver(container)));
        }
Beispiel #2
0
        public static DependableConfiguration UseSqlPersistenceProvider(
            this DependableConfiguration configuration,
            string connectionStringName,
            string instanceName)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            if (string.IsNullOrWhiteSpace(connectionStringName))
            {
                throw new ArgumentException("A valid connectionStringName is required.");
            }

            if (string.IsNullOrWhiteSpace(instanceName))
            {
                throw new ArgumentException("A valid instanceName is required.");
            }

            return(configuration.UsePersistenceProvider(
                       new SqlPersistenceProvider(connectionStringName, instanceName)));
        }
 public static DependableConfiguration UseConsoleEventLogger(
     this DependableConfiguration configuration,
     EventType eventMask = All)
 {
     return(configuration.UseEventSink(new ConsoleLoggerEventSink(eventMask)));
 }