コード例 #1
0
        public ControllerTester HasImportForFile(string relPath)
        {
            var imports = ImportManager.FromControllerContext(_context).GetImports();

            Assert.IsTrue(imports.Any(imp => imp.FromRelativePath == relPath));
            return(this);
        }
コード例 #2
0
        public MvcControllerTextTemplate(ControllerContext context, ScriptExtensionsFactory extensionsFactory)
        {
            _context          = context;
            _scriptExtensions = extensionsFactory;

            _imports              = ImportManager.FromControllerContext(context);
            _formatter            = new TypeScriptTypeFormatter(context.TypeCollection, new ModuleTypePrefixResolver(_imports));
            _postScriptExtensions = _scriptExtensions.CreatePostControllerScript(context);
        }