public void AddWidget(WidgetTemplate template) { var widget = Widget.CreateWidget(template); Widgets = Widgets.Union(new Widget[] { widget }).ToArray(); }
public static Widget CreateWidget(WidgetTemplate template) { if (template == null) throw new ArgumentNullException("template"); return new Widget(Guid.NewGuid().ToString(), template); }
public WorkspaceModel() { Widgets = new WidgetTemplate[] { }; }
public Widget(string id, WidgetTemplate template) { ID = id; Template = template; }