//----------------------------------------------------------------- public EntryComponentTemplate(EntryComponent template) { if (template == null) { throw new ArgumentNullException(); } _templateComponent = template; _holder = template.Holder; _templateComponent.OnEditModeModified += OnTemplateEditChanged_UpdateObservers; }
public EntryComponentTemplate(EntryComponentTemplate other) { if (other == null) { throw new ArgumentNullException(); } _holder = other._holder; _templateComponent = (EntryComponent)other.TemplateInstance.Clone(); //note: the observers list was not cloned as it will mess up the "components entry template" // _observersList = other.ObserversList.Select(x => x.Clone() as EntryComponent).ToList(); _templateComponent.OnEditModeModified += OnTemplateEditChanged_UpdateObservers; other.ObserversList.ForEach(x => x.CloneTo(AddObserver())); }
public EntryComponentTemplate(Type componentType, Entry_Components holder) { _holder = holder; InitializeTemplate(componentType); }
//constructors-------------------------------------------------------------------------------- public void Initialize(Entry_Components holder, string componentName = "Field Name") { _holder = holder; Initialize(componentName); }