/// <summary>Private CTor for deserialization</summary> /// <param name="info"></param> /// <param name="context"></param> protected UserGroupEntity(SerializationInfo info, StreamingContext context) : base(info, context) { _group = (GroupEntity)info.GetValue("_group", typeof(GroupEntity)); if (_group != null) { _group.AfterSave += new EventHandler(OnEntityAfterSave); } _groupReturnsNewIfNotFound = info.GetBoolean("_groupReturnsNewIfNotFound"); _alwaysFetchGroup = info.GetBoolean("_alwaysFetchGroup"); _alreadyFetchedGroup = info.GetBoolean("_alreadyFetchedGroup"); _user = (UserEntity)info.GetValue("_user", typeof(UserEntity)); if (_user != null) { _user.AfterSave += new EventHandler(OnEntityAfterSave); } _userReturnsNewIfNotFound = info.GetBoolean("_userReturnsNewIfNotFound"); _alwaysFetchUser = info.GetBoolean("_alwaysFetchUser"); _alreadyFetchedUser = info.GetBoolean("_alreadyFetchedUser"); this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance()); // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> Removes the sync logic for member _group</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 DesetupSyncGroup(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity(_group, new PropertyChangedEventHandler(OnGroupPropertyChanged), "Group", Northwind.SSDAL.RelationClasses.StaticUserGroupRelations.GroupEntityUsingGroupIdStatic, true, signalRelatedEntity, "UserGroups", resetFKFields, new int[] { (int)UserGroupFieldIndex.GroupId }); _group = null; }