本文整理汇总了C#中IArgumentProvider类的典型用法代码示例。如果您正苦于以下问题:C# IArgumentProvider类的具体用法?C# IArgumentProvider怎么用?C# IArgumentProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IArgumentProvider类属于命名空间,在下文中一共展示了IArgumentProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public static ITaskInteraction Create(
MSBuildFramework.IBuildEngine buildEngine,
ITaskOutputHandler outputHandler,
ITask task,
IArgumentProvider arguments,
ITypedServiceProvider services)
{
return new BuildTaskInteraction(task, arguments, outputHandler, buildEngine, services);
}
示例2: BuildTaskInteraction
private BuildTaskInteraction(
ITask task,
IArgumentProvider arguments,
ITaskOutputHandler outputHandler,
MSBuildFramework.IBuildEngine buildEngine,
ITypedServiceProvider services)
: base (arguments, services)
{
this.outputHandler = outputHandler;
this.loggers = new Lazy<BuildTaskLoggers>(() => new BuildTaskLoggers(buildEngine, task, arguments));
}
示例3: VisitArguments
public static Expression[] VisitArguments(ExpressionVisitor visitor, IArgumentProvider nodes)
{
Expression[] newNodes = null;
for (int i = 0, n = nodes.ArgumentCount; i < n; i++)
{
Expression curNode = nodes.GetArgument(i);
Expression node = visitor.Visit(curNode);
if (newNodes != null)
{
newNodes[i] = node;
}
else if (!object.ReferenceEquals(node, curNode))
{
newNodes = new Expression[n];
for (int j = 0; j < i; j++)
{
newNodes[j] = nodes.GetArgument(j);
}
newNodes[i] = node;
}
}
return newNodes;
}
示例4: Initialize
protected void Initialize(IArgumentProvider arguments)
{
string assembliesToResolve = arguments.GetOption<string>(StandardOptions.AssembliesToResolve);
if (!String.IsNullOrEmpty(assembliesToResolve))
{
foreach (string assemblyToResolve in assembliesToResolve.Split(';'))
{
this.AddAssemblyToResolve(assemblyToResolve);
}
}
string resolutionPaths = arguments.GetOption<string>(StandardOptions.AssemblyResolutionPaths);
if (!String.IsNullOrEmpty(resolutionPaths))
{
foreach (string resolutionPath in resolutionPaths.Split(';'))
{
if (!String.IsNullOrWhiteSpace(resolutionPath))
{
string expandedResolutionPath = Environment.ExpandEnvironmentVariables(resolutionPath);
this.AddResolutionPath(expandedResolutionPath);
}
}
}
}
示例5: ConsoleTaskLoggers
public ConsoleTaskLoggers(ITask task, IArgumentProvider arguments)
{
if (arguments.GetOption<bool?>(StandardOptions.Clipboard) ?? task.GetOptionDefault<bool>(StandardOptions.Clipboard[0]))
{
this.richTextLogger = new RichTextLogger();
this.csvLogger = new CsvLogger();
this.textLogger = new TextLogger();
this.spreadsheetLogger = new XmlSpreadsheetLogger();
this.aggregatedLogger = new AggregatedLogger(
ConsoleLogger.Instance,
this.richTextLogger,
this.spreadsheetLogger,
this.csvLogger,
this.textLogger);
this.RegisterLogger(LoggerType.Result, this.aggregatedLogger);
}
else
{
this.RegisterLogger(LoggerType.Result, ConsoleLogger.Instance);
}
this.RegisterLogger(LoggerType.Status, ConsoleLogger.Instance);
}
示例6: TestArgumentSettingsProvider
public TestArgumentSettingsProvider(string settingsSection, IArgumentProvider argumentProvider, IClientSettings clientSettings)
: base (settingsSection, argumentProvider, clientSettings)
{
}
示例7: Create
public static AssemblyResolver Create(IArgumentProvider arguments, IFileService fileService)
{
AssemblyResolver resolver = new AssemblyResolver(fileService);
resolver.Initialize(arguments);
return resolver;
}
示例8: ConsoleTaskExecution
/// <summary>
/// Execution handler for tasks running under the console.
/// </summary>
/// <param name="services">Override services, can be null. Used to get services before falling back on defaults.</param>
public ConsoleTaskExecution(IArgumentProvider argumentProvider, ITaskRegistry taskRegistry, ITypedServiceProvider services = null)
: base(argumentProvider, taskRegistry, services)
{
}
示例9: Create
public static AssemblyResolver Create(IArgumentProvider arguments)
{
AssemblyResolver resolver = new AssemblyResolver();
resolver.Initialize(arguments);
return resolver;
}
示例10: EmitMethodCall
// assumes 'object' of non-static call is already on stack
private void EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type objectType)
{
EmitMethodCall(mi, args, objectType, CompilationFlags.EmitAsNoTail);
}
示例11: EmitMethodCall
//CONFORMING
private void EmitMethodCall(Expression obj, MethodInfo method, IArgumentProvider methodCallExpr) {
// Emit instance, if calling an instance method
Type objectType = null;
if (!method.IsStatic) {
EmitInstance(obj, objectType = obj.Type);
}
EmitMethodCall(method, methodCallExpr, objectType);
}
示例12: Create
public static ITaskInteraction Create(ITask task, IArgumentProvider arguments, ITypedServiceProvider services)
{
return new ConsoleTaskInteraction(task, arguments, services);
}
示例13: ConsoleTaskInteraction
private ConsoleTaskInteraction(ITask task, IArgumentProvider arguments, ITypedServiceProvider services)
: base(arguments, services)
{
this.loggers = new Lazy<ConsoleTaskLoggers>(() => new ConsoleTaskLoggers(task, arguments));
}
示例14: ArgumentPrepender
internal ArgumentPrepender(Expression first, IArgumentProvider provider) {
_first = first;
_expression = provider;
}
示例15: BuildTaskExecution
/// <summary>
/// Execution handler for tasks running under MSBuild.
/// </summary>
/// <param name="services">Override services, can be null. Used to get services before falling back on defaults.</param>
public BuildTaskExecution(MSBuildFramework.IBuildEngine buildEngine, ITaskOutputHandler outputHandler, IArgumentProvider argumentProvider, ITaskRegistry taskRegistry, ITypedServiceProvider services = null)
: base(argumentProvider, taskRegistry, services)
{
this.outputHandler = outputHandler;
this.buildEngine = buildEngine;
}