/// <summary> setups the sync logic for member _snRelationship</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncSnRelationship(IEntityCore relatedEntity) { if(_snRelationship!=relatedEntity) { DesetupSyncSnRelationship(true, true); _snRelationship = (SnRelationshipEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _snRelationship, new PropertyChangedEventHandler( OnSnRelationshipPropertyChanged ), "SnRelationship", MonoSoftware.MonoX.DAL.RelationClasses.StaticSnCommentRelations.SnRelationshipEntityUsingRelationshipIdStatic, true, new string[] { } ); } }
protected SnCommentEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity)); if(_aspnetUser!=null) { _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave); } _snRelationship = (SnRelationshipEntity)info.GetValue("_snRelationship", typeof(SnRelationshipEntity)); if(_snRelationship!=null) { _snRelationship.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> Removes the sync logic for member _snRelationship</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 DesetupSyncSnRelationship(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _snRelationship, new PropertyChangedEventHandler( OnSnRelationshipPropertyChanged ), "SnRelationship", MonoSoftware.MonoX.DAL.RelationClasses.StaticSnCommentRelations.SnRelationshipEntityUsingRelationshipIdStatic, true, signalRelatedEntity, "SnComments", resetFKFields, new int[] { (int)SnCommentFieldIndex.RelationshipId } ); _snRelationship = null; }
protected SnFileEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _snEvents = (EntityCollection<SnEventEntity>)info.GetValue("_snEvents", typeof(EntityCollection<SnEventEntity>)); _snRelationships = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationships", typeof(EntityCollection<SnRelationshipEntity>)); _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity)); if(_aspnetUser!=null) { _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave); } _privacyLevel = (PrivacyLevelEntity)info.GetValue("_privacyLevel", typeof(PrivacyLevelEntity)); if(_privacyLevel!=null) { _privacyLevel.AfterSave+=new EventHandler(OnEntityAfterSave); } _snAlbum = (SnAlbumEntity)info.GetValue("_snAlbum", typeof(SnAlbumEntity)); if(_snAlbum!=null) { _snAlbum.AfterSave+=new EventHandler(OnEntityAfterSave); } _snRelationship = (SnRelationshipEntity)info.GetValue("_snRelationship", typeof(SnRelationshipEntity)); if(_snRelationship!=null) { _snRelationship.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }