当前位置: 首页>>代码示例>>C#>>正文


C# IJob类代码示例

本文整理汇总了C#中IJob的典型用法代码示例。如果您正苦于以下问题:C# IJob类的具体用法?C# IJob怎么用?C# IJob使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IJob类属于命名空间,在下文中一共展示了IJob类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

		public override StateEnums.Status Initialize ( IJob _job )
		{
			job = _job;
            log.InfoFormat(_job.KeyHash, "GenevaLoadablesXmlValidator initialized.");
			CheckEmptyValue = false;
			return StateEnums.Status.Success;
		}
开发者ID:BrianGoff,项目名称:BITS,代码行数:7,代码来源:GenevaLoadablesXmlValidator.cs

示例2: Point

        public Point(IJob job, int parentNumber)
        {
            this.job = job;
            this.parentNumber = parentNumber;

            Initialize();
        }
开发者ID:AndriyKhavro,项目名称:Parcs.NET,代码行数:7,代码来源:Point.cs

示例3: Initialize

        public override StateEnums.Status Initialize(IJob _job)
        {
            job = _job;

            log.InfoFormat(_job.KeyHash, "SmtpMailer initialized.");
            return StateEnums.Status.Success;
        }
开发者ID:BrianGoff,项目名称:BITS,代码行数:7,代码来源:SmtpMailer.cs

示例4: EncodeJobNotification

 public EncodeJobNotification(IJob[] jobsReady, string OriginalAssetName, ILocator[] Locators, string UrlForClientStreaming)
 {
     myJobList = jobsReady;
     myAssetName = OriginalAssetName;
     myLocators = Locators;
     myUrlForClientStreaming = UrlForClientStreaming;
 }
开发者ID:sabbour,项目名称:WAMSVODButler,代码行数:7,代码来源:EncodeJobNotification.cs

示例5: UpdateFrom

 /// <summary>
 /// Updates mutable properties from the data of the specified IJob.
 /// </summary>
 /// <param name="job"></param>
 public void UpdateFrom(IJob job)
 {
     Id = job.Id;
     Status = job.Status;
     Executable = job.Executable;
     Arguments = job.Arguments;
 }
开发者ID:driverpt,项目名称:SD-1213SI,代码行数:11,代码来源:JobAdapter.cs

示例6: ReturnJob

        public void ReturnJob(IJob job)
        {
            if (job == null)
                return;

            _container.Release(job);
        }
开发者ID:rjonker1,项目名称:lightstone-data-platform,代码行数:7,代码来源:JobFactory.cs

示例7: ModuleExecutor

 public ModuleExecutor(IChannel chan, IJob curJob, int pointNum)
 {
     _assemblyFullPath = curJob.FileName;
     _channel = chan;
     _currentJob = curJob;
     _pointNum = pointNum;
 }
开发者ID:AndriyKhavro,项目名称:Parcs.NET,代码行数:7,代码来源:ModuleExecutor.cs

示例8: JobHost

        public JobHost(IJob job)
        {
            this.job = job;
            this.timer = new Timer(this.DoAction);

            HostingEnvironment.RegisterObject(this);
        }
开发者ID:MartinBG,项目名称:Gva,代码行数:7,代码来源:JobHost.cs

示例9: ProcessItem

        public override void ProcessItem(IJob job, IJobItem item)
        {
            var bitRate = job.Preset.BitRate;
            var sampleRate = job.Preset.SampleRate;
            var tempdir = Path.GetTempPath();
            var tempfile = Path.Combine(tempdir, DateTime.Now.Ticks + "." + job.Preset.Extension);

            var subType = this.GetAudioSubtypeForExtension(job.Preset.Extension);
            var waveFormat = new WaveFormat(sampleRate, 2);

            var mediaType = MediaFoundationEncoder.SelectMediaType(subType, waveFormat, bitRate);

            if (mediaType != null)
            {
                using (var decoder = new MediaFoundationReader(item.LastFile))
                {
                    using (var encoder = new MediaFoundationEncoder(mediaType))
                    {
                        encoder.Encode(tempfile, decoder);
                    }
                }
            }

            item.TemporaryFiles.Add(tempfile);
        }
开发者ID:blacktau,项目名称:temporaltwist,代码行数:25,代码来源:NaudioEncodingStep.cs

示例10: JobViewModel

        public JobViewModel(IJob job)
        {
            this.id = job.id;
            this.title = job.title;
            this.description = job.description;
            this.date_posted = job.date_posted;
            this.group = job.group;
            this.groupDesc = StringHelpers.UppercaseFirst(job.groupDesc);
            this.specialization = job.specialization;
            this.specializationDesc = StringHelpers.UppercaseFirst(job.specializationDesc);
            this.workbase = job.workbase;
            this.workbaseDesc = StringHelpers.UppercaseFirst(job.workbaseDesc);
            this.entryLevel = job.entryLevel;
            this.hot = job.hot;
            this.sequence = job.sequence;

            if (!string.IsNullOrEmpty(job.metaDescription))
            {
                this.metaDescription = job.metaDescription;
            }

            if (!string.IsNullOrEmpty(job.metaTags))
            {
                this.metaTags = job.metaTags;
            }
        }
开发者ID:neiljc07,项目名称:VSEntityFramework,代码行数:26,代码来源:JobViewModel.cs

示例11: Start

        /// <summary>
        /// Starts this instance.
        /// </summary>
        /// <exception cref="System.InvalidOperationException">Job already started.</exception>
        public static void Start()
        {
            if (_job != null)
                throw new InvalidOperationException("Job already started.");

            var evidence = new Evidence(AppDomain.CurrentDomain.Evidence);
            var setup = new AppDomainSetup
            {
                ApplicationBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
                ShadowCopyFiles = "false"
            };

            _appDomain = AppDomain.CreateDomain("eSync-" + Guid.NewGuid(), evidence, setup);
            try
            {
                var assembly = _appDomain.Load(typeof(SyncServiceJob).Assembly.GetName());
                var jobTypeName = typeof(SyncServiceJob).FullName;

                _job = (IJob)_appDomain.CreateInstanceAndUnwrap(assembly.FullName, jobTypeName);
                _job.Start();
            }
            catch
            {
                _job = null;
                AppDomain.Unload(_appDomain);
                _appDomain = null;

                throw;
            }
        }
开发者ID:mparsin,项目名称:Elements,代码行数:34,代码来源:ESyncJob.cs

示例12: JobRunner

        /// <summary>
        /// Initializes a new instance of the <see cref="JobRunner"/> class.
        /// </summary>
        public JobRunner(IJobConfiguration configuration, Type jobType, JobLockProvider jobLockProvider, JobHistoryProvider jobHistoryProvider, IDependencyResolver dependencyResolver)
        {
            _id = Guid.NewGuid().ToString("N").Substring(0, 10).ToLower();
            _isBusy = new Synchronized<bool>();
            _lastResult = new Synchronized<string>();
            _lastRunStartTime = new Synchronized<DateTime>();
            _lastRunFinishTime = new Synchronized<DateTime>();
            _lastStatus = new Synchronized<JobStatus>();
            _nextRunTime = new Synchronized<DateTime>();
            _status = new Synchronized<JobStatus>();
            _runLock = new object();
            _name = configuration.Name;
            _description = configuration.Description;
            _group = configuration.Group;
            _interval = configuration.Interval;
            _isTimeOfDay = configuration.IsTimeOfDay;
            _keepAlive = configuration.KeepAlive;
            _arguments = configuration.Arguments;

            _jobType = jobType;
            _jobLockProvider = jobLockProvider ?? new DefaultJobLockProvider();
            _dependencyResolver = dependencyResolver ?? new DefaultDependencyResolver();
            _jobHistoryProvider = jobHistoryProvider;

            _instance = null;
            _timer = new Timer(OnTimerCallback);

            if (_jobHistoryProvider != null)
                _jobHistoryProvider.RestoreHistory(this);

            Trace.TraceInformation("Job {0} created on {1}.", Name, Environment.MachineName);
        }
开发者ID:arpitgold,项目名称:Exceptionless,代码行数:35,代码来源:JobRunner.cs

示例13: ProcessItem

 public override void ProcessItem(IJob job, IJobItem item)
 {
     foreach (var file in item.TemporaryFiles)
     {
         File.Delete(file);
     }
 }
开发者ID:blacktau,项目名称:temporaltwist,代码行数:7,代码来源:CleanupStep.cs

示例14: MultipleProcessor

        public MultipleProcessor(CloudMediaContext context, IJob myJob = null)
        {
            InitializeComponent();
            this.Icon = Bitmaps.Azure_Explorer_ico;
            _context = context;
            _myJob = myJob;
            buttonTaskOptions1.Initialize(_context, true);
            buttonTaskOptions2.Initialize(_context, true);
            buttonTaskOptions3.Initialize(_context, true);
            buttonTaskOptions4.Initialize(_context, true);
            buttonTaskOptions5.Initialize(_context, true);
            buttonTaskOptions1.Click += ButtonTaskOptions_Click;
            buttonTaskOptions2.Click += ButtonTaskOptions_Click;
            buttonTaskOptions3.Click += ButtonTaskOptions_Click;
            buttonTaskOptions4.Click += ButtonTaskOptions_Click;
            buttonTaskOptions5.Click += ButtonTaskOptions_Click;

            if (_myJob != null) // we are in resubmit mode
            {
                textBoxConfiguration1.Text = _myJob.Tasks.FirstOrDefault().GetClearConfiguration();
                radioButtonSingleJobForAllInputAssets.Checked = true;
                panelJobMode.Enabled = false;
                numericUpDownTasks.Enabled = false;
                SelectedAssets = myJob.InputMediaAssets.ToList();
            }

            labelWarningJSON1.Text = labelWarningJSON2.Text = labelWarningJSON3.Text = labelWarningJSON4.Text = labelWarningJSON5.Text = string.Empty;

            init = false;
        }
开发者ID:vaibhavkadian,项目名称:Azure-Media-Services-Explorer,代码行数:30,代码来源:MultipleProcessor.cs

示例15: OnSubJobDone

        protected override void OnSubJobDone(IJob job)
        {
            this.RemoveSubJob(job);

            if (this.SubJobs.Count == 0)
                SetStatus(JobStatus.Done);
        }
开发者ID:Fulborg,项目名称:dwarrowdelf,代码行数:7,代码来源:FetchItems.cs


注:本文中的IJob类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。