本文整理汇总了C#中IScriptEngine类的典型用法代码示例。如果您正苦于以下问题:C# IScriptEngine类的具体用法?C# IScriptEngine怎么用?C# IScriptEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IScriptEngine类属于命名空间,在下文中一共展示了IScriptEngine类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ScriptCSSession
ScriptCSSession( IScriptEngine engine, ScriptPackSession scriptPackSession, CurrentCmdletScriptPack currentCmdletScriptPack, CurrentLogger logger)
{
_engine = engine;
_scriptPackSession = scriptPackSession;
_currentCmdletScriptPack = currentCmdletScriptPack;
_logger = logger;
}
开发者ID:modulexcite,项目名称:scriptcs-powershell-module,代码行数:7,代码来源:ScriptCSSession.cs
示例2: Camera
public Camera(IScriptEngine scriptEngine, IApplicationContext context)
{
_scriptEngine = scriptEngine;
_context = context;
Size = 200;
}
开发者ID:Fedorm,项目名称:core-master,代码行数:7,代码来源:Camera.cs
示例3: FileSystem
public FileSystem(IScriptEngine scriptEngine, IApplicationContext io)
{
_scriptEngine = scriptEngine;
_io = io;
ReadFsLog();
}
开发者ID:Fedorm,项目名称:core-master,代码行数:7,代码来源:FileSystem.cs
示例4: ExecuteScript
private CalamariResult ExecuteScript(IScriptEngine psse, string scriptName, CalamariVariableDictionary variables)
{
var capture = new CaptureCommandOutput();
var runner = new CommandLineRunner(capture);
var result = psse.Execute(scriptName, variables, runner);
return new CalamariResult(result.ExitCode, capture);
}
开发者ID:bjewell52,项目名称:Calamari,代码行数:7,代码来源:ScriptEngineFixture.cs
示例5: ScriptServices
public ScriptServices(
IFileSystem fileSystem,
IPackageAssemblyResolver packageAssemblyResolver,
IScriptExecutor executor,
IScriptEngine engine,
IFilePreProcessor filePreProcessor,
IReplCommandService replCommandService,
IScriptPackResolver scriptPackResolver,
IPackageInstaller packageInstaller,
ILog logger,
IAssemblyResolver assemblyResolver,
IConsole console = null,
IInstallationProvider installationProvider = null
)
{
FileSystem = fileSystem;
PackageAssemblyResolver = packageAssemblyResolver;
Executor = executor;
Engine = engine;
FilePreProcessor = filePreProcessor;
ReplCommandService = replCommandService;
ScriptPackResolver = scriptPackResolver;
PackageInstaller = packageInstaller;
Logger = logger;
Console = console;
AssemblyResolver = assemblyResolver;
InstallationProvider = installationProvider;
}
开发者ID:ktroach,项目名称:scriptcs-replcommand-infra,代码行数:28,代码来源:ScriptServices.cs
示例6: Web
public Web(IScriptEngine engine, IWebProvider provider)
{
Assert.IsNotNull(engine); Assert.IsNotNull(provider);
_scriptEngine = engine;
_provider = provider;
}
开发者ID:Fedorm,项目名称:core-master,代码行数:7,代码来源:Web.cs
示例7: Gallery
public Gallery(IApplicationContext context, IScriptEngine engine)
{
_context = context;
_scriptEngine = engine;
Size = 200;
}
开发者ID:Fedorm,项目名称:core-master,代码行数:7,代码来源:Gallery.cs
示例8: ScriptExecutor
public ScriptExecutor(
IFileSystem fileSystem,
IFilePreProcessor filePreProcessor,
IScriptEngine scriptEngine,
ILogProvider logProvider,
IScriptLibraryComposer composer)
{
Guard.AgainstNullArgument("fileSystem", fileSystem);
Guard.AgainstNullArgumentProperty("fileSystem", "BinFolder", fileSystem.BinFolder);
Guard.AgainstNullArgumentProperty("fileSystem", "DllCacheFolder", fileSystem.DllCacheFolder);
Guard.AgainstNullArgument("filePreProcessor", filePreProcessor);
Guard.AgainstNullArgument("scriptEngine", scriptEngine);
Guard.AgainstNullArgument("logProvider", logProvider);
Guard.AgainstNullArgument("composer", composer);
References = new AssemblyReferences(DefaultReferences);
Namespaces = new Collection<string>();
ImportNamespaces(DefaultNamespaces);
FileSystem = fileSystem;
FilePreProcessor = filePreProcessor;
ScriptEngine = scriptEngine;
_log = logProvider.ForCurrentType();
#pragma warning disable 618
Logger = new ScriptCsLogger(_log);
#pragma warning restore 618
ScriptLibraryComposer = composer;
}
开发者ID:JamesLinus,项目名称:scriptcs,代码行数:27,代码来源:ScriptExecutor.cs
示例9: ScriptServices
public ScriptServices(
IFileSystem fileSystem,
IPackageAssemblyResolver packageAssemblyResolver,
IScriptExecutor executor,
IRepl repl,
IScriptEngine engine,
IFilePreProcessor filePreProcessor,
IScriptPackResolver scriptPackResolver,
IPackageInstaller packageInstaller,
IObjectSerializer objectSerializer,
ILog logger,
IAssemblyResolver assemblyResolver,
IEnumerable<IReplCommand> replCommands,
IConsole console = null,
IInstallationProvider installationProvider = null)
{
FileSystem = fileSystem;
PackageAssemblyResolver = packageAssemblyResolver;
Executor = executor;
Repl = repl;
Engine = engine;
FilePreProcessor = filePreProcessor;
ScriptPackResolver = scriptPackResolver;
PackageInstaller = packageInstaller;
ObjectSerializer = objectSerializer;
Logger = logger;
Console = console;
AssemblyResolver = assemblyResolver;
InstallationProvider = installationProvider;
ReplCommands = replCommands;
}
开发者ID:jrusbatch,项目名称:scriptcs,代码行数:31,代码来源:ScriptServices.cs
示例10: ExecuteReplCommand
public ExecuteReplCommand(
string scriptName,
string[] scriptArgs,
IFileSystem fileSystem,
IScriptPackResolver scriptPackResolver,
IScriptEngine scriptEngine,
IFilePreProcessor filePreProcessor,
IObjectSerializer serializer,
ILog logger,
IConsole console,
IAssemblyResolver assemblyResolver,
IEnumerable<IReplCommand> replCommands)
{
_scriptName = scriptName;
_scriptArgs = scriptArgs;
_fileSystem = fileSystem;
_scriptPackResolver = scriptPackResolver;
_scriptEngine = scriptEngine;
_filePreProcessor = filePreProcessor;
_serializer = serializer;
_logger = logger;
_console = console;
_assemblyResolver = assemblyResolver;
_replCommands = replCommands;
}
开发者ID:selony,项目名称:scriptcs,代码行数:25,代码来源:ExecuteReplCommand.cs
示例11: Run
/// <summary>
/// Executes the comand line - depending upon the options provided we will
/// either run a single file, a single command, or enter the interactive loop.
/// </summary>
public int Run(IScriptEngine engine, IConsole console, ConsoleOptions options) {
Contract.RequiresNotNull(engine, "engine");
Contract.RequiresNotNull(console, "console");
Contract.RequiresNotNull(options, "options");
_engine = engine;
_options = options;
_console = console;
Initialize();
try {
return Run();
#if !SILVERLIGHT // ThreadAbortException.ExceptionState
} catch (System.Threading.ThreadAbortException tae) {
if (tae.ExceptionState is KeyboardInterruptException) {
Thread.ResetAbort();
}
return -1;
#endif
} finally {
Shutdown(engine);
}
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:29,代码来源:CommandLine.cs
示例12: ScriptExecutor
public ScriptExecutor(IFileSystem fileSystem, IFilePreProcessor filePreProcessor, IScriptEngine scriptEngine, ILog logger)
{
FileSystem = fileSystem;
FilePreProcessor = filePreProcessor;
ScriptEngine = scriptEngine;
Logger = logger;
}
开发者ID:7sharp9,项目名称:scriptcs,代码行数:7,代码来源:ScriptExecutor.cs
示例13: PackagedScriptConvention
public PackagedScriptConvention(string scriptFilePrefix, ICalamariFileSystem fileSystem, IScriptEngine scriptEngine, ICommandLineRunner commandLineRunner)
{
this.scriptFilePrefix = scriptFilePrefix;
this.fileSystem = fileSystem;
this.scriptEngine = scriptEngine;
this.commandLineRunner = commandLineRunner;
}
开发者ID:enlightendesigns,项目名称:Calamari,代码行数:7,代码来源:PackagedScriptConvention.cs
示例14: DeployAzureCloudServicePackageConvention
public DeployAzureCloudServicePackageConvention(ICalamariFileSystem fileSystem, ICalamariEmbeddedResources embeddedResources,
IScriptEngine scriptEngine, ICommandLineRunner commandLineRunner)
{
this.fileSystem = fileSystem;
this.embeddedResources = embeddedResources;
this.scriptEngine = scriptEngine;
this.commandLineRunner = commandLineRunner;
}
开发者ID:sergio,项目名称:Calamari,代码行数:8,代码来源:DeployAzureCloudServicePackageConvention.cs
示例15: CreateCore
private RShipCore CreateCore(IScriptEngine engine)
{
var modulesPath = Path.Combine(PathHelpers.GetAssemblyDirectory(), "ship_modules");
var pathResolver = new ModulePathResolver(modulesPath, new[] { ".ship", ".js", ".json", ".dll" }, "lib");
var loaderFactory = new ModuleLoaderFactory();
var core = new RShipCore(engine, pathResolver, loaderFactory);
return core;
}
开发者ID:furesoft,项目名称:RShipCore,代码行数:8,代码来源:RShipLoader.cs
示例16: SourceFileContentProvider
/// <summary>
/// Binary file with a default encoding. The actual encoding of the file is determined by first
/// bytes of the file in a language specific way.
/// </summary>
public SourceFileContentProvider(string path, Encoding defaultEncoding, IScriptEngine engine)
{
Contract.RequiresNotNull(defaultEncoding, "defaultEncoding");
_path = path;
_defaultEncoding = defaultEncoding;
_engine = engine;
}
开发者ID:robertlj,项目名称:IronScheme,代码行数:12,代码来源:SourceFileContentProvider.cs
示例17: Repl
public Repl(IFileSystem fileSystem, IScriptEngine scriptEngine, ILog logger, IConsole console, IFilePreProcessor filePreProcessor)
{
FileSystem = fileSystem;
ScriptEngine = scriptEngine;
FilePreProcessor = filePreProcessor;
Logger = logger;
Console = console;
}
开发者ID:ChowZenki,项目名称:scriptcs,代码行数:8,代码来源:Repl.cs
示例18: ConfiguredScriptConvention
public ConfiguredScriptConvention(string deploymentStage, IScriptEngine scriptEngine,
ICalamariFileSystem fileSystem, ICommandLineRunner commandLineRunner)
{
this.deploymentStage = deploymentStage;
this.scriptEngine = scriptEngine;
this.fileSystem = fileSystem;
this.commandLineRunner = commandLineRunner;
}
开发者ID:bjewell52,项目名称:Calamari,代码行数:8,代码来源:ConfiguredScriptConvention.cs
示例19: ShouldLoadScriptPacksIfScriptNameIsSet
public void ShouldLoadScriptPacksIfScriptNameIsSet(IConsole console, TestLogProvider logProvider, IScriptEngine engine)
{
var builder = new ScriptServicesBuilder(console, logProvider);
builder.Overrides[typeof(IScriptEngine)] = engine.GetType();
builder.ScriptName("");
builder.Build();
var runtimeServices = (RuntimeServices)builder.RuntimeServices;
runtimeServices.InitDirectoryCatalog.ShouldBeTrue();
}
开发者ID:AsCloud,项目名称:scriptcs,代码行数:9,代码来源:ScriptServicesBuilderTests.cs
示例20: FeatureScriptConvention
public FeatureScriptConvention(string deploymentStage, ICalamariFileSystem fileSystem, ICalamariEmbeddedResources embeddedResources,
IScriptEngine scriptEngine, ICommandLineRunner commandLineRunner)
{
this.deploymentStage = deploymentStage;
this.fileSystem = fileSystem;
this.embeddedResources = embeddedResources;
this.scriptEngine = scriptEngine;
this.commandLineRunner = commandLineRunner;
}
开发者ID:sergio,项目名称:Calamari,代码行数:9,代码来源:FeatureScriptConvention.cs
注:本文中的IScriptEngine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论