public static ContainerBuilder GetDefaultContainer(SqlJobArguments args) { var sqlOptions = new SqlOptions(args.Server, args.Database, args.UserName); var cb = new ContainerBuilder(); cb.RegisterModule(new PSnappyModule(sqlOptions)); return(cb); }
public JobBase(SqlJobArguments args) { var container = JobRunner.GetDefaultContainer(args); _scope = container.Build().BeginLifetimeScope(); _logger = _scope.Resolve <IStatusLogger>(); _logger.UpdateProcessId(args.ProcessId); _runManager = _scope.Resolve <IRunManager>(); }