/// <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; }
/// <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); }
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); }