public ServerSchedulerFactory()
 {
     _factory = new TaskServiceConvertorFactory();
     _service = new Dev2TaskService(ConvertorFactory);
     _dir = new DirectoryHelper();
     CreateDir();
 }
Пример #2
0
 public ScheduleTrigger(TaskState state, ITrigger trigger, IDev2TaskService service, ITaskServiceConvertorFactory factory)
 {
     _service = service;
     _factory = factory;
     State    = state;
     Trigger  = trigger;
 }
Пример #3
0
 public Dev2TaskService(ITaskServiceConvertorFactory taskServiceConvertorFactory, string targetServer,
                        string userName = null, string accountDomain = null, string password = null,
                        bool forceV1    = false)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _taskServiceConvertorFactory.CreateTaskService(targetServer, userName, accountDomain, password, forceV1);
 }
        public ScheduledResourceModel(IDev2TaskService taskService, string warewolfFolderId, string warewolfAgentPath,
                                      ITaskServiceConvertorFactory taskServiceFactory, string debugHistoryPath, ISecurityWrapper securityWrapper)
        {
            var nullables = new Dictionary<string, object>
                {
                    {"taskService", taskService},
                    {"warewolfFolderId", warewolfFolderId},
                    {"warewolfAgentPath", warewolfAgentPath},
                    {"taskServiceFactory", taskServiceFactory},
                    {"debugHistoryPath", debugHistoryPath},
                    {"securityWrapper", securityWrapper}
                };
            VerifyArgument.AreNotNull(nullables);

            _taskStates = new Dictionary<int, string>
                {
                    {102, "Task Completed"},
                    {100, "Task Started"},
                    {101, "Failed To Start"},
                    {103, "Job Failed"},
                    {104, "Logon Failed"}
                };
            _taskService = taskService;
            _warewolfFolderPath = warewolfFolderId;
            _warewolfAgentPath = warewolfAgentPath;

            _factory = taskServiceFactory;
            _debugHistoryPath = debugHistoryPath;
            _securityWrapper = securityWrapper;
        }
Пример #5
0
 public ServerSchedulerFactory()
 {
     _factory = new TaskServiceConvertorFactory();
     _service = new Dev2TaskService(ConvertorFactory);
     _dir     = new DirectoryHelper();
     CreateDir();
 }
Пример #6
0
        public ScheduledResourceModel(IDev2TaskService taskService, string warewolfFolderId, string warewolfAgentPath,
                                      ITaskServiceConvertorFactory taskServiceFactory, string debugHistoryPath, ISecurityWrapper securityWrapper)
        {
            var nullables = new Dictionary <string, object>
            {
                { "taskService", taskService },
                { "warewolfFolderId", warewolfFolderId },
                { "warewolfAgentPath", warewolfAgentPath },
                { "taskServiceFactory", taskServiceFactory },
                { "debugHistoryPath", debugHistoryPath },
                { "securityWrapper", securityWrapper }
            };

            VerifyArgument.AreNotNull(nullables);

            _taskStates = new Dictionary <int, string>
            {
                { 102, "Task Completed" },
                { 100, "Task Started" },
                { 101, "Failed To Start" },
                { 103, "Job Failed" },
                { 104, "Logon Failed" }
            };
            _taskService        = taskService;
            _warewolfFolderPath = warewolfFolderId;
            _warewolfAgentPath  = warewolfAgentPath;

            _factory          = taskServiceFactory;
            _debugHistoryPath = debugHistoryPath;
            _securityWrapper  = securityWrapper;
        }
Пример #7
0
 public Dev2TaskService(ITaskServiceConvertorFactory taskServiceConvertorFactory, string targetServer,
     string userName = null, string accountDomain = null, string password = null,
     bool forceV1 = false)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _taskServiceConvertorFactory.CreateTaskService(targetServer, userName, accountDomain, password, forceV1);
 }
Пример #8
0
 public ServerSchedulerFactory(Func <IScheduledResource, string> pathResolve)
 {
     _pathResolve = pathResolve;
     _factory     = new TaskServiceConvertorFactory();
     _service     = new Dev2TaskService(ConvertorFactory);
     _dir         = new DirectoryHelper();
     CreateDir();
 }
Пример #9
0
        public ScheduleTrigger(TaskState state, ITrigger trigger, IDev2TaskService service, ITaskServiceConvertorFactory factory)
        {
            _service = service;
            _factory = factory;
            State = state;
            Trigger = trigger;

        }
Пример #10
0
        ITrigger GetTriggerFromXml(string nativeXml)
        {
            _factory = _factory ?? new TaskServiceConvertorFactory();
            _service = _service ?? new Dev2TaskService(_factory);
            using (var task = _service.NewTask())
            {
                task.AddAction(_factory.CreateExecAction("notepad"));

                task.XmlText = nativeXml;
                return(task.Triggers.FirstOrDefault());
            }
        }
Пример #11
0
        private ITrigger GetTriggerFromXml(string nativeXml)
        {
            _factory = _factory ?? new TaskServiceConvertorFactory();
            _service = _service ?? new Dev2TaskService(_factory);
            using (var task = _service.NewTask())
            {
                task.AddAction(_factory.CreateExecAction("notepad"));

                task.XmlText = nativeXml;
                return task.Triggers.FirstOrDefault();
            }
        }
Пример #12
0
        string SetXmlFromTrigger(ITrigger value)
        {
            _factory = _factory ?? new TaskServiceConvertorFactory();
            _service = _service ?? new Dev2TaskService(_factory);
            using (var task = _service.NewTask())
            {
                task.AddAction(_factory.CreateExecAction("notepad"));
                task.AddTrigger(value);

                return(task.XmlText);
            }
        }
Пример #13
0
 private string SetXmlFromTrigger(ITrigger value)
 {
     _factory= _factory ?? new TaskServiceConvertorFactory();
    _service= _service ?? new Dev2TaskService(_factory);
     using (var task = _service.NewTask())
     {
         task.AddAction(_factory.CreateExecAction("notepad"));
         task.AddTrigger(value);
       
         return task.XmlText;
     }
 }
        public ServerSchedulerFactory(IDev2TaskService service, ITaskServiceConvertorFactory factory, IDirectoryHelper directory)
        {
            var nullables = new Dictionary<string, object>
                {
                    {"service", service},
                    {"factory", factory},
                    {"directory", directory},

                };
            VerifyArgument.AreNotNull(nullables);
            _service = service;
            _factory = factory;
            _dir = directory;
            CreateDir();
        }
Пример #15
0
        public ServerSchedulerFactory(IDev2TaskService service, ITaskServiceConvertorFactory factory, IDirectoryHelper directory)
        {
            var nullables = new Dictionary <string, object>
            {
                { "service", service },
                { "factory", factory },
                { "directory", directory },
            };

            VerifyArgument.AreNotNull(nullables);
            _service = service;
            _factory = factory;
            _dir     = directory;
            CreateDir();
        }
Пример #16
0
        public ServerSchedulerFactory(IDev2TaskService service, ITaskServiceConvertorFactory factory, IDirectory directory, Func <IScheduledResource, string> pathResolve)
        {
            var nullables = new Dictionary <string, object>
            {
                { "service", service },
                { "factory", factory },
                { "directory", directory },
            };

            VerifyArgument.AreNotNull(nullables);
            _service     = service;
            _factory     = factory;
            _dir         = directory;
            _pathResolve = pathResolve;
            CreateDir();
        }
 public Dev2TaskEventLog(ITaskServiceConvertorFactory factory, TaskEventLog taskLog)
 {
     _taskLog = taskLog;
     _factory = factory;
 }
Пример #18
0
 public Dev2RegistrationTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory,
                                RegistrationTrigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
Пример #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public ClientSchedulerFactory(IDev2TaskService service, ITaskServiceConvertorFactory serviceConvertorFactory)
 {
     _service = service;
     _serviceConvertorFactory = serviceConvertorFactory;
 }
Пример #20
0
 public Dev2MonthlyDowTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory,
                              MonthlyDOWTrigger instance) : base(taskServiceConvertorFactory, instance)
 {
 }
Пример #21
0
 public Dev2TaskDefinition(ITaskServiceConvertorFactory taskServiceConvertorFactory,
                           TaskDefinition taskDefinition)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _taskDefinition = taskDefinition;
 }
Пример #22
0
 public Dev2TaskCollection(ITaskServiceConvertorFactory taskServiceConvertorFactory, TaskCollection instance)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _instance = instance;
 }
 public Dev2ActionCollection(ITaskServiceConvertorFactory taskServiceConvertorFactory,
     ActionCollection nativeInstance)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _nativeInstance = nativeInstance;
 }
 public Dev2LogonTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, LogonTrigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
Пример #25
0
 public Dev2WeeklyTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, Trigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
Пример #26
0
 public Dev2IdleTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, IdleTrigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
 public Dev2MonthlyDowTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory,
     MonthlyDOWTrigger instance) : base(taskServiceConvertorFactory, instance)
 {
 }
 public Dev2WeeklyTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, Trigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
Пример #29
0
 public Dev2IdleTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, IdleTrigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
Пример #30
0
 public Dev2ExecAction(ITaskServiceConvertorFactory taskServiceConvertorFactory, ExecAction nativeTnstance)
     : base(nativeTnstance)
 {
 }
 public Dev2EventTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, EventTrigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
Пример #32
0
 public Dev2EventTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, EventTrigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
 public Dev2TaskCollection(ITaskServiceConvertorFactory taskServiceConvertorFactory, TaskCollection instance)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _instance = instance;
 }
Пример #34
0
 public Dev2TaskDefinition(ITaskServiceConvertorFactory taskServiceConvertorFactory,
     TaskDefinition taskDefinition)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _taskDefinition = taskDefinition;
 }
Пример #35
0
 public Dev2TaskFolder(ITaskServiceConvertorFactory taskServiceConvertorFactory, TaskFolder instance)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _instance = instance;
 }
Пример #36
0
 public Dev2TaskService(ITaskServiceConvertorFactory taskServiceConvertorFactory)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _nativeService = taskServiceConvertorFactory.CreateTaskService();
 }
Пример #37
0
 public Dev2Trigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, Trigger instance)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _instance = instance;
 }
Пример #38
0
 public Dev2ExecAction(ITaskServiceConvertorFactory taskServiceConvertorFactory, ExecAction nativeTnstance)
     : base(nativeTnstance)
 {
 }
Пример #39
0
 public Dev2Task(ITaskServiceConvertorFactory taskServiceConvertorFactory, Task nativeObject)
 {
     _nativeObject = nativeObject;
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
 }
Пример #40
0
 public Dev2ActionCollection(ITaskServiceConvertorFactory taskServiceConvertorFactory,
                             ActionCollection nativeInstance)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _nativeInstance = nativeInstance;
 }
Пример #41
0
 public Dev2TaskService(ITaskServiceConvertorFactory taskServiceConvertorFactory, TaskService service)
 {
     _nativeService = service;
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
 }
Пример #42
0
 public ScheduledResourceModel(IDev2TaskService taskService, string warewolfFolderId, string warewolfAgentPath, ITaskServiceConvertorFactory taskServiceFactory, string debugHistoryPath, ISecurityWrapper securityWrapper, Func <IScheduledResource, string> pathResolve)
     : this(taskService, warewolfFolderId, warewolfAgentPath, taskServiceFactory, debugHistoryPath, securityWrapper, pathResolve, new FileWrapper(), new DirectoryWrapper())
 {
 }
Пример #43
0
 public Dev2TaskService(ITaskServiceConvertorFactory taskServiceConvertorFactory)
 {
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
     _nativeService = taskServiceConvertorFactory.CreateTaskService();
 }
 public Dev2TaskEventLog(ITaskServiceConvertorFactory factory, TaskEventLog taskLog)
 {
     _taskLog = taskLog;
     _factory = factory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public ClientSchedulerFactory(IDev2TaskService service, ITaskServiceConvertorFactory serviceConvertorFactory)
 {
     _service = service;
     _serviceConvertorFactory = serviceConvertorFactory;
 }
 public Dev2BootTrigger(ITaskServiceConvertorFactory _taskServiceConvertorFactory, BootTrigger instance)
     : base(_taskServiceConvertorFactory, instance)
 {
 }
Пример #47
0
 public Dev2LogonTrigger(ITaskServiceConvertorFactory taskServiceConvertorFactory, LogonTrigger instance)
     : base(taskServiceConvertorFactory, instance)
 {
 }
 public Dev2TimeTrigger(ITaskServiceConvertorFactory _taskServiceConvertorFactory, TimeTrigger instance)
     : base(_taskServiceConvertorFactory, instance)
 {
 }
Пример #49
0
 public Dev2Task(ITaskServiceConvertorFactory taskServiceConvertorFactory, Task nativeObject)
 {
     _nativeObject = nativeObject;
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
 }
Пример #50
0
 public Dev2TaskService(ITaskServiceConvertorFactory taskServiceConvertorFactory, TaskService service)
 {
     _nativeService = service;
     _taskServiceConvertorFactory = taskServiceConvertorFactory;
 }