/// <summary> /// Initializes a new instance of the OxiteViewModel class. /// </summary> /// <param name="viewModel">OxiteViewModel instance that is the parent of the newly create instance.</param> public OxiteViewModel(OxiteViewModel viewModel) : this() { parent = viewModel; SyncViewModel(viewModel); }
/// <summary> /// Set all the properties of the OxiteViewModel to the properties of the given OxiteViewModel instance. /// </summary> /// <param name="viewModel">OxiteViewModel to use for setting all the properties of the current OxiteViewModel.</param> protected void SyncViewModel(OxiteViewModel viewModel) { if (viewModel == null) { return; } Container = viewModel.Container; Site = viewModel.Site; modelItems.Clear(); viewModel.getModelItemTypes().ToList().ForEach(mit => AddModelItem(viewModel.GetModelItem(mit))); }
protected void SyncViewModel(OxiteViewModel viewModel) { if (viewModel == null) { return; } Container = viewModel.Container; Site = viewModel.Site; User = viewModel.User; PluginTemplates = viewModel.PluginTemplates; SignInUrl = viewModel.SignInUrl; SignOutUrl = viewModel.SignOutUrl; modelItems.Clear(); viewModel.GetModelItemTypes().ToList().ForEach(mit => AddModelItem(viewModel.GetModelItem(mit))); }
public ExceptionOxiteViewModel(OxiteViewModel model, Exception exception) { SyncViewModel(model); Exception = exception; }
public OxiteViewModelItemItems(T item, IEnumerable <K> items, OxiteViewModel viewModel) : base(item) { SyncViewModel(viewModel); Items = items; }
public OxiteViewModelItems(IEnumerable <T> items, OxiteViewModel viewModel) : this(items) { SyncViewModel(viewModel); }