本文整理汇总了C#中IResourceManager.GetStringFromAssemblyOf方法的典型用法代码示例。如果您正苦于以下问题:C# IResourceManager.GetStringFromAssemblyOf方法的具体用法?C# IResourceManager.GetStringFromAssemblyOf怎么用?C# IResourceManager.GetStringFromAssemblyOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IResourceManager
的用法示例。
在下文中一共展示了IResourceManager.GetStringFromAssemblyOf方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Framework
public Framework(IResourceManager resourceManager)
{
ScriptName = "jasmine.js";
Script = resourceManager.GetStringFromAssemblyOf<Framework>("Forseti.Jasmine.Scripts.jasmine.js");
ExecuteScriptName = "jasmine-executor.js";
ExecuteScript = resourceManager.GetStringFromAssemblyOf<Framework>("Forseti.Jasmine.Scripts.jasmine-executor.js");
ReportScriptName = "jasmine-reporter.js";
ReportScript = resourceManager.GetStringFromAssemblyOf<Framework>("Forseti.Jasmine.Scripts.jasmine-reporter.js");
}
示例2: PageGenerator
public PageGenerator(IResourceManager resourceManager)
{
var template = resourceManager.GetStringFromAssemblyOf<PageGenerator>("Forseti.Pages.Spark.Harness.spark");
_jqueryJs = resourceManager.GetStringFromAssemblyOf<Forseti.Scripting.ScriptEngine>("Forseti.Scripting.Scripts.jquery.min.js");
_forsetiJs = resourceManager.GetStringFromAssemblyOf<Forseti.Scripting.ScriptEngine>("Forseti.Scripting.Scripts.forseti.js");
_requireJs = resourceManager.GetStringFromAssemblyOf<Forseti.Scripting.ScriptEngine>("Forseti.Scripting.Scripts.require.js");
_forsetiBootstrapperJs = resourceManager.GetStringFromAssemblyOf<Forseti.Scripting.ScriptEngine>("Forseti.Scripting.Scripts.forseti.bootstrapper.js");
var settings = new SparkSettings().SetPageBaseType(typeof(HarnessView));
var templates = new InMemoryViewFolder();
_engine = new SparkViewEngine(settings)
{
ViewFolder = templates
};
templates.Add(TemplateName, template);
_descriptor = new SparkViewDescriptor().AddTemplate(TemplateName);
}
示例3: PageGenerator
public PageGenerator(IResourceManager resourceManager)
{
var template = resourceManager.GetStringFromAssemblyOf<PageGenerator>("Forseti.Pages.Spark.Harness.spark");
var settings = new SparkSettings().SetPageBaseType(typeof(HarnessView));
var templates = new InMemoryViewFolder();
_engine = new SparkViewEngine(settings)
{
ViewFolder = templates
};
templates.Add(TemplateName, template);
_descriptor = new SparkViewDescriptor().AddTemplate(TemplateName);
}
示例4: ScriptEngineContext
public ScriptEngineContext(IResourceManager resourceManager, IDependencyManager scriptDependencies)
{
var envJs = resourceManager.GetStringFromAssemblyOf<ScriptEngine>("Forseti.Scripting.Scripts.env.js");
_context = Context.enter();
_context.setOptimizationLevel(-1);
_scope = _context.initStandardObjects();
AddClassAndMethods(typeof(SystemConsole));
SystemConsole.LoggingEnabled = false;
_context.evaluateString(_scope, envJs, "env.js", 1, null);
SystemConsole.LoggingEnabled = true;
}
示例5: PageGenerator
public PageGenerator(IResourceManager resourceManager, IFramework framework)
{
var template = resourceManager.GetStringFromAssemblyOf<PageGenerator>("Forseti.Pages.Spark.Harness.spark");
_framework = framework;
var settings = new SparkSettings().SetPageBaseType(typeof(HarnessView));
var templates = new InMemoryViewFolder();
_engine = new SparkViewEngine(settings)
{
ViewFolder = templates
};
templates.Add(TemplateName, template); //"<for each=\"var s in Stuff\"><p>${s}</p></for>");
_descriptor = new SparkViewDescriptor().AddTemplate(TemplateName);
}
示例6: ScriptEngineContext
public ScriptEngineContext(IResourceManager resourceManager)
{
var envJs = resourceManager.GetStringFromAssemblyOf<ScriptEngine>("Forseti.Scripting.Scripts.env.js");
_context = Context.enter();
_context.setOptimizationLevel(-1);
_scope = _context.initStandardObjects();
Class myJClass = typeof(SystemConsole);
Member method = myJClass.getMethod("Print", typeof(string));
Scriptable function = new FunctionObject("print", method, _scope);
_scope.put("print", _scope, function);
SystemConsole.LoggingEnabled = false;
_context.evaluateString(_scope, envJs, "env.js", 1, null);
SystemConsole.LoggingEnabled = true;
}