本文整理汇总了C#中IExecutor类的典型用法代码示例。如果您正苦于以下问题:C# IExecutor类的具体用法?C# IExecutor怎么用?C# IExecutor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IExecutor类属于命名空间,在下文中一共展示了IExecutor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:14,代码来源:ExecutionEntity.cs
示例2: Backgrounding
internal Backgrounding(CuratorFrameworkImpl client,
IBackgroundCallback callback,
Object context,
IExecutor executor)
: this(wrapCallback(client, callback, executor), context)
{
}
开发者ID:Lagrang,项目名称:CuratorNet,代码行数:7,代码来源:Backgrounding.cs
示例3: Toolchain
public Toolchain(string name, IGenerator generator, IBuilder builder, IExecutor executor)
{
Name = name;
Generator = generator;
Builder = builder;
Executor = executor;
}
开发者ID:omariom,项目名称:BenchmarkDotNet,代码行数:7,代码来源:Toolchain.cs
示例4: ArtifactPublisherExecutorDecorator
public ArtifactPublisherExecutorDecorator(string artifactsPath, string reportName, IExecutor inner, IServiceMessages serviceMessages)
{
this.artifactsPath = artifactsPath;
this.reportName = reportName;
this.inner = inner;
this.serviceMessages = serviceMessages;
}
开发者ID:Tdue21,项目名称:teamcitycsharprunner,代码行数:7,代码来源:ArtifactPublisherExecutorDecorator.cs
示例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;
}
开发者ID:JackWangCUMT,项目名称:Fibrous,代码行数:14,代码来源:Fiber.cs
示例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;
}
开发者ID:szabototo89,项目名称:CodeSharper,代码行数:10,代码来源:CommandCallControlFlow.cs
示例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;
}
开发者ID:rlxrlxrlx,项目名称:spring-net-integration,代码行数:13,代码来源:ErrorHandlingTaskExecutor.cs
示例8: ToDoListPresenter
public ToDoListPresenter(IToDoListView view, ITaskList taskList, IExecutor executor)
{
this.view = view;
this.executor = executor;
this.taskList = taskList;
WireUpEvents();
}
开发者ID:jthigpen,项目名称:winforms-mvp,代码行数:7,代码来源:ToDoListPresenter.cs
示例9: SetUp
public void SetUp()
{
executor = Stub<IExecutor>();
runData = new RunData();
ender = Stub<IThreadEnder>();
target = new ExecutorThreadImpl(executor, runData);
}
开发者ID:sscobici,项目名称:ParallelTestRunner,代码行数:7,代码来源:ExecutorThreadTest.cs
示例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;
}
开发者ID:romanpeshterski,项目名称:OpenJudgeSystem,代码行数:30,代码来源:ExecutionStrategy.cs
示例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;
}
}
开发者ID:prunkster,项目名称:db-migrator-net,代码行数:30,代码来源:ConnectionStringExtractor.cs
示例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();
}
开发者ID:amoraller,项目名称:AptekaAutoOrder,代码行数:14,代码来源:MySchedular.cs
示例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);
}
开发者ID:bcrusu,项目名称:mesos-clr,代码行数:9,代码来源:MesosExecutorDriver.cs
示例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;
}
开发者ID:gamemaster101gr,项目名称:toe,代码行数:9,代码来源:LuaParser.cs
示例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));
}
开发者ID:tiger2soft,项目名称:bbv.Common,代码行数:9,代码来源:ExecutorTest.cs
示例16: Execute_ShouldExecuteSyntaxWithExtensions
public void Execute_ShouldExecuteSyntaxWithExtensions(IExecutor<IExtension> testee)
{
this.SetupSyntaxReturnsExecutables();
testee.Execute(this.syntax.Object, this.extensions, this.executionContext.Object);
this.firstExecutable.Verify(e => e.Execute(this.extensions, It.IsAny<IExecutableContext>()));
this.secondExecutable.Verify(e => e.Execute(this.extensions, It.IsAny<IExecutableContext>()));
}
开发者ID:tiger2soft,项目名称:bbv.Common,代码行数:9,代码来源:ExecutorTest.cs
示例17: SocketClient
public SocketClient(IExecutor executor)
{
this.connectedTcs = new TaskCompletionSource<int>();
this.executor = executor;
this.socket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
this.wasConnected = false;
}
开发者ID:Rush,项目名称:Stacks,代码行数:9,代码来源:SocketClient.cs
示例18: DedicatedThreadPoolFiber
public DedicatedThreadPoolFiber(IExecutor executor, int numThreads)
{
Executor = executor ?? new BasicExecutor();
numThreads.NotNegative();
numThreads.NotLessThan(1);
_numThreads = numThreads;
_threadPool = new DedicatedThreadPool(new DedicatedThreadPoolSettings(numThreads));
Running = true;
}
开发者ID:KeithLee208,项目名称:helios,代码行数:9,代码来源:DedicatedThreadPoolFiber.cs
示例19: ExecutionContext
public ExecutionContext(IExecutor executor, object parameter = null, IDictionary<string, object> extendedProperties = null)
{
if(executor == null)
throw new ArgumentNullException("executor");
_executor = executor;
_parameter = parameter;
if(extendedProperties != null && extendedProperties.Count > 0)
_extendedProperties = new Dictionary<string, object>(extendedProperties);
}
开发者ID:Flagwind,项目名称:Zongsoft.CoreLibrary,代码行数:11,代码来源:ExecutionContext.cs
示例20: SocketClient
/// <summary>
/// Create new socket client using given executor and already connected socket.
/// This method will fail, if socket is not already connected.
/// </summary>
public SocketClient(IExecutor executor, Socket socket)
{
InitialiseCommon(executor);
this.socket = socket;
this.wasConnected = true;
EnsureSocketIsConnected();
InitialiseConnectedSocket();
}
开发者ID:wushian,项目名称:Stacks,代码行数:15,代码来源:SocketClient.cs
注:本文中的IExecutor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论