コード例 #1
0
        /// <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);
        }
コード例 #2
0
        /// <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)));
        }
コード例 #3
0
        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)));
        }
コード例 #4
0
        public ExceptionOxiteViewModel(OxiteViewModel model, Exception exception)
        {
            SyncViewModel(model);

            Exception = exception;
        }
コード例 #5
0
 public OxiteViewModelItemItems(T item, IEnumerable <K> items, OxiteViewModel viewModel)
     : base(item)
 {
     SyncViewModel(viewModel);
     Items = items;
 }
コード例 #6
0
 public OxiteViewModelItems(IEnumerable <T> items, OxiteViewModel viewModel)
     : this(items)
 {
     SyncViewModel(viewModel);
 }