internal void SetSource(ScriptView view, DTObject source) { this.Id = source.GetValue <string>("id", string.Empty); this.Name = source.GetValue <string>("name", string.Empty); this.Metadata = source.GetObject("metadata"); this.View = view; }
public static T Create <T>(ScriptView view, DTObject element) where T : ScriptElement { var se = Activator.CreateInstance(typeof(T)) as ScriptElement; se.SetSource(view, element); return((T)se); }
public void On(ViewEvent evt, Action <ScriptView> action) { if (_data == null) { _data = new Dictionary <ViewEvent, ScriptView>(); } ScriptView view = null; if (!_data.TryGetValue(evt, out view)) { view = new ScriptView(); _data.Add(evt, view); } action(view); }
internal ScriptViewSession(ScriptView owner, DTObject data) { _owner = owner; _data = data; }