Esempio n. 1
0
        static void Main(string[] args)
        {
            IEmployee myEmployee = Factory.CreateIEmployee();

            myEmployee.Name    = "Mert";
            myEmployee.Surname = "Yavuz";
            myEmployee.Age     = 25;


            IJob job = Factory.CreateIJob();

            job.Employee = myEmployee;
            job.JobName  = "Doing an IoC presentation";


            job.DoJob(2);
            job.DoJob(1);
            job.FinishJob();
        }
Esempio n. 2
0
        public void RunModule(IModuleOptions options = null)
        {
            if (!string.IsNullOrEmpty(options?.ServerIp))
            {
                Job.SetServerIp(options.ServerIp);
            }

            IJob job = null;

            try
            {
                job = CreateJob(options?.Priority ?? 0, options?.Username ?? "");
                Run(new ModuleInfo(job, null));
            }

            finally
            {
                job?.FinishJob();
            }
        }