示例#1
0
 public SparkResource(string controllerName, SparkJavascriptAction action, ISparkResourceContentFetcher contentFetcher)
 {
     _controllerName = controllerName;
     _action = action;
     _actionName = _action.ActionName;
     _contentFetcher = contentFetcher;
     _lastModified = DateTime.Now; //don't know how to determine this right now
 }
示例#2
0
        public void Init()
        {
            _contentFetcher = new Mock<ISparkResourceContentFetcher>();

            var sparkJavascriptAction = new SparkJavascriptAction { ActionName = "MyAction", ViewName = "MyView", MasterName = "MyMaster"};

            _resource = new SparkResource("MyController", sparkJavascriptAction, _contentFetcher.Object);
        }
示例#3
0
 public SparkResource(string controllerName, SparkJavascriptAction action, ISparkResourceContentFetcher contentFetcher)
 {
     _controllerName = controllerName;
     _action         = action;
     _actionName     = _action.ActionName;
     _contentFetcher = contentFetcher;
     _lastModified   = DateTime.Now;           //don't know how to determine this right now
 }
示例#4
0
        public void Init()
        {
            _contentFetcher = new Mock <ISparkResourceContentFetcher>();

            var sparkJavascriptAction = new SparkJavascriptAction {
                ActionName = "MyAction", ViewName = "MyView", MasterName = "MyMaster"
            };

            _resource = new SparkResource("MyController", sparkJavascriptAction, _contentFetcher.Object);
        }
示例#5
0
 private IResource CreateResource(Type controllerType, SparkJavascriptAction action)
 {
     return(new SparkResource(controllerType.ControllerName(), action, _contentFetcher));
 }