当前位置: 首页>>代码示例>>C#>>正文


C# IResourceManager.GetStringFromAssemblyOf方法代码示例

本文整理汇总了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");
 }
开发者ID:TomasEkeli,项目名称:Forseti,代码行数:9,代码来源:Framework.cs

示例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);
        }
开发者ID:dolittle,项目名称:Forseti,代码行数:17,代码来源:PageGenerator.cs

示例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);
        }
开发者ID:edgarbjorntvedt,项目名称:Forseti,代码行数:13,代码来源:PageGenerator.cs

示例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;
        }
开发者ID:edgarbjorntvedt,项目名称:Forseti,代码行数:14,代码来源:ScriptEngineContext.cs

示例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);
        }
开发者ID:TomasEkeli,项目名称:Forseti,代码行数:15,代码来源:PageGenerator.cs

示例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;
        }
开发者ID:TomasEkeli,项目名称:Forseti,代码行数:17,代码来源:ScriptEngineContext.cs


注:本文中的IResourceManager.GetStringFromAssemblyOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。