/// <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.StaticSnTagRelations.SnRelationshipEntityUsingRelationshipIdStatic, true, new string[] { }); } }
protected SnTagEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _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.StaticSnTagRelations.SnRelationshipEntityUsingRelationshipIdStatic, true, signalRelatedEntity, "SnTags", resetFKFields, new int[] { (int)SnTagFieldIndex.RelationshipId }); _snRelationship = null; }