public MvcActionTextTemplate(MvcAction action, ScriptExtensionsFactory extensionsFactory, FetchFunctionDescriptor fetchFunc, TypeFormatter formatter)
 {
     _action         = action;
     _formatter      = formatter;
     _fetchFunc      = fetchFunc;
     _bodyExtensions = extensionsFactory.CreateForActionFunctionBody(action);
 }
        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);
        }
Exemplo n.º 3
0
 public ScriptTemplateFactory(ConfigOptions options)
 {
     _scriptExtensions = new ScriptExtensionsFactory(options.QueryParams);
 }