示例#1
0
 /// <summary> setups the sync logic for member _postContent</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncPostContent(IEntityCore relatedEntity)
 {
     if (_postContent != relatedEntity)
     {
         DesetupSyncPostContent(true, true);
         _postContent = (PostContentEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_postContent, new PropertyChangedEventHandler(OnPostContentPropertyChanged), "PostContent", Let3arafo.Data.RelationClasses.StaticPostContentRelations.PostContentEntityUsingIdPostIdStatic, true, new string[] {  });
     }
 }
示例#2
0
 protected PostContentEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _postContents = (EntityCollection <PostContentEntity>)info.GetValue("_postContents", typeof(EntityCollection <PostContentEntity>));
         _postContent  = (PostContentEntity)info.GetValue("_postContent", typeof(PostContentEntity));
         if (_postContent != null)
         {
             _postContent.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
示例#3
0
 /// <summary> Removes the sync logic for member _postContent</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 DesetupSyncPostContent(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_postContent, new PropertyChangedEventHandler(OnPostContentPropertyChanged), "PostContent", Let3arafo.Data.RelationClasses.StaticPostContentRelations.PostContentEntityUsingIdPostIdStatic, true, signalRelatedEntity, "PostContents", resetFKFields, new int[] { (int)PostContentFieldIndex.PostId });
     _postContent = null;
 }