protected override void InitializeInternal() { var application = CreateApplication(); var iocContainer = CreateIocContainer(); application.Initialize(_platform, iocContainer, GetAssemblies().ToArrayEx(), InitializationContext ?? DataContext.Empty); FrameStateManager.RegisterFrame(_rootFrame); var service = CreateNavigationService(_rootFrame); if (service != null) { iocContainer.BindToConstant(service); } Should.PropertyNotBeNull(PhoneApplicationService.Current, "PhoneApplicationService.Current"); }
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.PropertyNotBeNull(Entity, nameof(Entity)); OnChangesApplied(result); RaiseChangesApplied(result); InvalidateProperties(); return(result); }
private void OnBeginEdit() { Should.PropertyNotBeNull(Entity, nameof(Entity)); object oldInstance = _initializedEntity; if (oldInstance != null) { RemoveInstance(oldInstance); ClearErrors(); } _initializedEntity = Entity; AddInstance(_initializedEntity); if (oldInstance == null) { AddInstance(this); } ValidateAsync(); HasChanges = IsNewRecord; InvalidateProperties(); }