protected CommunityUserEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _community = (CommunityEntity)info.GetValue("_community", typeof(CommunityEntity)); if (_community != null) { _community.AfterSave += new EventHandler(OnEntityAfterSave); } _user = (UserEntity)info.GetValue("_user", typeof(UserEntity)); if (_user != null) { _user.AfterSave += new EventHandler(OnEntityAfterSave); } _user1 = (UserEntity)info.GetValue("_user1", typeof(UserEntity)); if (_user1 != null) { _user1.AfterSave += new EventHandler(OnEntityAfterSave); } _user2 = (UserEntity)info.GetValue("_user2", typeof(UserEntity)); if (_user2 != null) { _user2.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 _community</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCommunity(IEntityCore relatedEntity) { if (_community != relatedEntity) { DesetupSyncCommunity(true, true); _community = (CommunityEntity)relatedEntity; this.PerformSetupSyncRelatedEntity(_community, new PropertyChangedEventHandler(OnCommunityPropertyChanged), "Community", Let3arafo.Data.RelationClasses.StaticCommunityUserRelations.CommunityEntityUsingCommunityIdStatic, true, new string[] { }); } }
/// <summary> Removes the sync logic for member _community</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 DesetupSyncCommunity(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity(_community, new PropertyChangedEventHandler(OnCommunityPropertyChanged), "Community", Let3arafo.Data.RelationClasses.StaticCommunityUserRelations.CommunityEntityUsingCommunityIdStatic, true, signalRelatedEntity, "CommunityUsers", resetFKFields, new int[] { (int)CommunityUserFieldIndex.CommunityId }); _community = null; }