本文整理汇总了C#中IJob类的典型用法代码示例。如果您正苦于以下问题:C# IJob类的具体用法?C# IJob怎么用?C# IJob使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IJob类属于命名空间,在下文中一共展示了IJob类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: GiveBack
public void GiveBack(IJob job)
{
if (job == null || !_jobReferences.ContainsKey(job)) return;
_jobReferences[job].LockFile.Dispose();
_jobReferences.Remove(job);
}
开发者ID:CloudMetal,项目名称:CloudMetal-Pipeline-Deploy,代码行数:7,代码来源:JobManager.cs
示例17: AddPriorityJobBeforeDependentJob
private static string AddPriorityJobBeforeDependentJob(string orderedJobs, IJob job)
{
int jobIndex = orderedJobs.IndexOf(job.Name);
string prefix = orderedJobs.Substring(0, jobIndex);
string suffix = orderedJobs.Substring(jobIndex);
return prefix + job.Dependency + suffix;
}
开发者ID:pfidalgomachado,项目名称:code-katas,代码行数:7,代码来源:OrderedJobsAlgorithm.cs
示例18:
void IProcess.ProcessJob(IJob job)
{
var input = JobDataHelper<IStockInput<int,int>>
.New(job.Definition).ForInputGet(job);
var output = JobDataHelper<IStockOutput<int>>
.New(job.Definition).ForOutputSet(job);
JobExecutionHelper.New()
.AddHandler(() => MathOpsDefinitions.Add,
() =>
{
output.Set(o => o.Output,
input.Get(i => i.FirstInput) + input.Get(i => i.SecondInput));
})
.AddHandler(() => MathOpsDefinitions.Subtract,
() =>
{
output.Set(o => o.Output,
input.Get(i => i.FirstInput) - input.Get(i => i.SecondInput));
})
.AddHandler(() => MathOpsDefinitions.Multiply,
() =>
{
output.Set(o => o.Output,
input.Get(i => i.FirstInput) * input.Get(i => i.SecondInput));
})
.AddHandler(() => MathOpsDefinitions.Divide,
() =>
{
output.Set(o => o.Output,
input.Get(i => i.FirstInput) / input.Get(i => i.SecondInput));
})
.Execute(job.Definition);
}
开发者ID:ckpearson,项目名称:distrib,代码行数:35,代码来源:MathOperationsProcessPlugin.cs
示例19: CompleteJob
public bool CompleteJob(IJob job)
{
if (!_spots.ContainsKey(job)) return false;
var zoneSpot = _spots[job];
_zoneAvailability[zoneSpot.Item1][zoneSpot.Item2] = false;
return true;
}
开发者ID:mikesurface,项目名称:SchedulingManager,代码行数:7,代码来源:ZoneManager.cs
示例20: ProcessJob
private void ProcessJob(IJob job)
{
if (job == null)
{
return;
}
var progressIncrement = 100.0 / this.stepStateMapper.Count;
foreach (var jobItem in job.JobItems)
{
jobItem.IsBeingProcessed = true;
while (jobItem.State != JobItemState.Done)
{
var nextStep = this.stepStateMapper.GetStepForState(jobItem.State);
nextStep.ProcessItem(job, jobItem);
jobItem.State++;
jobItem.Progress = progressIncrement + jobItem.Progress;
if (this.worker.CancellationPending)
{
break;
}
}
jobItem.IsBeingProcessed = false;
if (this.worker.CancellationPending)
{
break;
}
}
this.processingFinishedCallback?.Invoke(job);
}
开发者ID:blacktau,项目名称:temporaltwist,代码行数:34,代码来源:JobProcessor.cs
注:本文中的IJob类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论