public void Init() { mocks = new MockRepository(); view = mocks.PartialMock<SparkView>(); engineContext = new StubEngineContext(new UrlInfo("", "Home", "Index", "/", "castle")); controllerContext = new ControllerContext(); }
public void Init() { mocks = new MockRepository(); view = mocks.PartialMock <SparkView>(); engineContext = new StubEngineContext(new UrlInfo("", "Home", "Index", "/", "castle")); controllerContext = new ControllerContext(); }
public ViewComponentContext(SparkView view, SparkViewFactory viewEngine, IDictionary componentParameters, Action body, IDictionary<string, Action> sections) { _view = view; _viewEngine = viewEngine; _componentParameters = componentParameters; this.body = body; this.sections = sections; //_contextVarsAdapter = new ContextVarsAdapter(this); _contextVarsAdapter = new Hashtable(view.PropertyBag); }
public void OnEnable() { targetScript = (SparkView)target; observedBehaviours = new ReorderableList(serializedObject, serializedObject.FindProperty("_observedBehaviours"), true, true, true, true) { drawHeaderCallback = rect => { EditorGUI.LabelField(rect, "Observed Behaviours", EditorStyles.boldLabel); }, drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => { var element = observedBehaviours.serializedProperty.GetArrayElementAtIndex(index); EditorGUI.ObjectField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, GUIContent.none); } }; }
public SparkViewData(SparkView view) { _view = view; }
public static string FooFor <T>(this SparkView view, Expression <Action <T> > action) { return(string.Format("Foo on lambda expression {0}", action)); }