/// <summary>
        ///     Starts the current bootstraper.
        /// </summary>
        protected override void OnInitialize()
        {
            base.OnInitialize();
            FrameStateManager.RegisterFrame(_rootFrame);
            var service = CreateNavigationService(_rootFrame);

            if (service != null)
            {
                IocContainer.BindToConstant(service);
            }
            Should.PropertyBeNotNull(PhoneApplicationService.Current, "PhoneApplicationService.Current");
            PhoneApplicationService.Current.Launching += OnLaunching;
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Applies the changes of entity.
        /// </summary>
        /// <returns>A series of instances of <see cref="IEntityStateEntry" />.</returns>
        public IList <IEntityStateEntry> ApplyChanges()
        {
            EnsureNotDisposed();
            if (!IsEntityInitialized)
            {
                throw ExceptionManager.EditorNotInitialized(this);
            }
            T entity;
            IList <IEntityStateEntry> result = ApplyChangesInternal(out entity) ??
                                               Empty.Array <IEntityStateEntry>();

            Entity = entity;
            Should.PropertyBeNotNull(Entity, "Entity");
            OnChangesApplied(result);
            RaiseChangesApplied(result);
            return(result);
        }
Ejemplo n.º 3
0
 private void OnBeginEdit()
 {
     Should.PropertyBeNotNull(Entity, "Entity");
     if (_initializedEntity == null)
     {
         AddInstance(this);
     }
     else
     {
         RemoveInstance(_initializedEntity);
         ClearErrors();
     }
     _initializedEntity = Entity;
     AddInstance(_initializedEntity);
     ValidateAsync();
     HasChanges = IsNewRecord;
     OnPropertyChanged(string.Empty);
 }