Example #1
0
        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);
        }
Example #2
0
        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>();
        }