本文整理汇总了C#中IExecutor类的典型用法代码示例。如果您正苦于以下问题:C# IExecutor类的具体用法?C# IExecutor怎么用?C# IExecutor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IExecutor类属于命名空间,在下文中一共展示了IExecutor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecutionEntity
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="receiver"></param>
/// <param name="timeOut"></param>
/// <param name="requestMessage"></param>
public ExecutionEntity(IExecutor executor, ArbiterClientId receiverID, TimeSpan timeOut, Message message)
: base(timeOut)
{
_executor = executor;
_receiverID = receiverID;
_message = message;
}
示例2: Backgrounding
internal Backgrounding(CuratorFrameworkImpl client,
IBackgroundCallback callback,
Object context,
IExecutor executor)
: this(wrapCallback(client, callback, executor), context)
{
}
示例3: Toolchain
public Toolchain(string name, IGenerator generator, IBuilder builder, IExecutor executor)
{
Name = name;
Generator = generator;
Builder = builder;
Executor = executor;
}
示例4: ArtifactPublisherExecutorDecorator
public ArtifactPublisherExecutorDecorator(string artifactsPath, string reportName, IExecutor inner, IServiceMessages serviceMessages)
{
this.artifactsPath = artifactsPath;
this.reportName = reportName;
this.inner = inner;
this.serviceMessages = serviceMessages;
}
示例5: StartNew
//TODO: add Queue
/// <summary>
/// Helper to create and start an IFiber by type
/// </summary>
/// <param name="type"></param>
/// <param name="executor"></param>
/// <returns></returns>
public static IFiber StartNew(FiberType type, IExecutor executor = null)
{
if (executor == null) executor = new Executor();
IFiber fiber = GetFromTyoe(type, executor);
fiber.Start();
return fiber;
}
示例6: CommandCallControlFlow
/// <summary>
/// Initializes a new instance of the <see cref="CommandCallControlFlow"/> class.
/// </summary>
public CommandCallControlFlow(Command command, IExecutor executor)
{
Assume.NotNull(command, nameof(command));
Assume.NotNull(executor, nameof(executor));
Command = command;
Executor = executor;
}
示例7: ErrorHandlingTaskExecutor
/// <summary>
/// create a new <see cref="ErrorHandlingTaskExecutor"/> with <paramref name="taskExecutor"/> and
/// <paramref name="errorHandler"/>
/// </summary>
/// <param name="taskExecutor">the task executor</param>
/// <param name="errorHandler">the error handler in case of an exception</param>
public ErrorHandlingTaskExecutor(IExecutor taskExecutor, IErrorHandler errorHandler)
{
AssertUtils.ArgumentNotNull(taskExecutor, "taskExecutor must not be null");
AssertUtils.ArgumentNotNull(errorHandler, "errorHandler must not be null");
_taskExecutor = taskExecutor;
_errorHandler = errorHandler;
}
示例8: ToDoListPresenter
public ToDoListPresenter(IToDoListView view, ITaskList taskList, IExecutor executor)
{
this.view = view;
this.executor = executor;
this.taskList = taskList;
WireUpEvents();
}
示例9: SetUp
public void SetUp()
{
executor = Stub<IExecutor>();
runData = new RunData();
ender = Stub<IThreadEnder>();
target = new ExecutorThreadImpl(executor, runData);
}
示例10: CompileExecuteAndCheck
protected ExecutionResult CompileExecuteAndCheck(ExecutionContext executionContext, Func<CompilerType, string> getCompilerPathFunc, IExecutor executor)
{
var result = new ExecutionResult();
// Compile the file
var compilerPath = getCompilerPathFunc(executionContext.CompilerType);
var compilerResult = this.Compile(executionContext.CompilerType, compilerPath, executionContext.AdditionalCompilerArguments, executionContext.Code);
result.IsCompiledSuccessfully = compilerResult.IsCompiledSuccessfully;
result.CompilerComment = compilerResult.CompilerComment;
if (!compilerResult.IsCompiledSuccessfully)
{
return result;
}
var outputFile = compilerResult.OutputFile;
// Execute and check each test
IChecker checker = Checker.CreateChecker(executionContext.CheckerAssemblyName, executionContext.CheckerTypeName, executionContext.CheckerParameter);
foreach (var test in executionContext.Tests)
{
var processExecutionResult = executor.Execute(outputFile, test.Input, executionContext.TimeLimit, executionContext.MemoryLimit);
var testResult = this.ExecuteAndCheckTest(test, processExecutionResult, checker, processExecutionResult.ReceivedOutput);
result.TestResults.Add(testResult);
}
// Clean our mess
File.Delete(outputFile);
return result;
}
示例11: LoadConnectionStringInto
public void LoadConnectionStringInto(string xpathExpression, IExecutor executor)
{
var r = Extract(xpathExpression);
if (r.IntegratedSecurity)
{
executor.Username = string.Empty;
executor.Password = string.Empty;
}
if (!string.IsNullOrEmpty(r.DataSource))
{
executor.Host = r.DataSource;
}
if (!string.IsNullOrEmpty(r.UserID))
{
executor.Username = r.UserID;
}
if (!string.IsNullOrEmpty(r.Password))
{
executor.Password = r.Password;
}
if (!string.IsNullOrEmpty(r.InitialCatalog))
{
executor.Database = r.InitialCatalog;
}
}
示例12: MySchedular
/// <summary>
/// Создать экземпляр планировщика
/// </summary>
/// <param name="sett">Настройки</param>
/// <param name="action">Действие</param>
/// <param name="Executor">Менеджер исполнения</param>
protected MySchedular(SchedularSettings sett, Action action, IExecutor Executor = null)
{
this.sett = sett;
executor = Executor ?? new Executor();
this.action = action;
if (sett.Interval != default(TimeSpan))
new Thread(DoWork) { IsBackground = true }.Start();
}
示例13: MesosExecutorDriver
public MesosExecutorDriver(IExecutor executor)
{
if (executor == null) throw new ArgumentNullException(nameof(executor));
Executor = executor;
Id = DriverRegistry.Register(this);
_bridge = new ExecutorDriverBridge();
_bridge.Initialize (Id);
}
示例14: LuaParser
public LuaParser(IExecutor executor, string file)
{
this.file_name = Path.GetFileName (file);
this.input = File.OpenText (file);
this.row = 1;
this.col = 1;
this.CurrentExecutor = executor;
}
示例15: Execute_ShouldCreateExecutableContextForExecutables
public void Execute_ShouldCreateExecutableContextForExecutables(IExecutor<IExtension> testee)
{
this.SetupSyntaxReturnsExecutables();
testee.Execute(this.syntax.Object, this.extensions, this.executionContext.Object);
this.executionContext.Verify(e => e.CreateExecutableContext(this.firstExecutable.Object));
this.executionContext.Verify(e => e.CreateExecutableContext(this.secondExecutable.Object));
}