Exemple #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
 }
Exemple #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);
        }
Exemple #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
 }
Exemple #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);
        }
Exemple #5
0
 private IResource CreateResource(Type controllerType, SparkJavascriptAction action)
 {
     return(new SparkResource(controllerType.ControllerName(), action, _contentFetcher));
 }