/// <summary> setups the sync logic for member _navigation</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncNavigation(IEntityCore relatedEntity) { if(_navigation!=relatedEntity) { DesetupSyncNavigation(true, true); _navigation = (NavigationEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _navigation, new PropertyChangedEventHandler( OnNavigationPropertyChanged ), "Navigation", MonoSoftware.MonoX.DAL.RelationClasses.StaticNavigationLocalizationRelations.NavigationEntityUsingNavigationIdStatic, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _navigation</summary> /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param> /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param> private void DesetupSyncNavigation(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _navigation, new PropertyChangedEventHandler( OnNavigationPropertyChanged ), "Navigation", MonoSoftware.MonoX.DAL.RelationClasses.StaticNavigationLocalizationRelations.NavigationEntityUsingNavigationIdStatic, true, signalRelatedEntity, "NavigationLocalizations", resetFKFields, new int[] { (int)NavigationLocalizationFieldIndex.NavigationId } ); _navigation = null; }
protected NavigationLocalizationEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _language = (LanguageEntity)info.GetValue("_language", typeof(LanguageEntity)); if(_language!=null) { _language.AfterSave+=new EventHandler(OnEntityAfterSave); } _navigation = (NavigationEntity)info.GetValue("_navigation", typeof(NavigationEntity)); if(_navigation!=null) { _navigation.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> setups the sync logic for member _parentNavigationItem</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncParentNavigationItem(IEntityCore relatedEntity) { if(_parentNavigationItem!=relatedEntity) { DesetupSyncParentNavigationItem(true, true); _parentNavigationItem = (NavigationEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _parentNavigationItem, new PropertyChangedEventHandler( OnParentNavigationItemPropertyChanged ), "ParentNavigationItem", MonoSoftware.MonoX.DAL.RelationClasses.StaticNavigationRelations.NavigationEntityUsingIdParentIdStatic, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _parentNavigationItem</summary> /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param> /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param> private void DesetupSyncParentNavigationItem(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _parentNavigationItem, new PropertyChangedEventHandler( OnParentNavigationItemPropertyChanged ), "ParentNavigationItem", MonoSoftware.MonoX.DAL.RelationClasses.StaticNavigationRelations.NavigationEntityUsingIdParentIdStatic, true, signalRelatedEntity, "ChildNavigationItems", resetFKFields, new int[] { (int)NavigationFieldIndex.ParentId } ); _parentNavigationItem = null; }
protected NavigationEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _childNavigationItems = (EntityCollection<NavigationEntity>)info.GetValue("_childNavigationItems", typeof(EntityCollection<NavigationEntity>)); _navigationLocalizations = (EntityCollection<NavigationLocalizationEntity>)info.GetValue("_navigationLocalizations", typeof(EntityCollection<NavigationLocalizationEntity>)); _navigationRoles = (EntityCollection<NavigationRoleEntity>)info.GetValue("_navigationRoles", typeof(EntityCollection<NavigationRoleEntity>)); _aspnetApplication = (AspnetApplicationsEntity)info.GetValue("_aspnetApplication", typeof(AspnetApplicationsEntity)); if(_aspnetApplication!=null) { _aspnetApplication.AfterSave+=new EventHandler(OnEntityAfterSave); } _parentNavigationItem = (NavigationEntity)info.GetValue("_parentNavigationItem", typeof(NavigationEntity)); if(_parentNavigationItem!=null) { _parentNavigationItem.AfterSave+=new EventHandler(OnEntityAfterSave); } _page = (PageEntity)info.GetValue("_page", typeof(PageEntity)); if(_page!=null) { _page.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }