示例#1
0
        protected EventPodEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _eventPodRoom = (EntityCollection <EventPodRoomEntity>)info.GetValue("_eventPodRoom", typeof(EntityCollection <EventPodRoomEntity>));

                _events = (EventsEntity)info.GetValue("_events", typeof(EventsEntity));
                if (_events != null)
                {
                    _events.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _podDetails = (PodDetailsEntity)info.GetValue("_podDetails", typeof(PodDetailsEntity));
                if (_podDetails != null)
                {
                    _podDetails.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _territory = (TerritoryEntity)info.GetValue("_territory", typeof(TerritoryEntity));
                if (_territory != null)
                {
                    _territory.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
示例#2
0
        protected EventPodTeamEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _eventRole = (EventRoleEntity)info.GetValue("_eventRole", typeof(EventRoleEntity));
                if (_eventRole != null)
                {
                    _eventRole.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _organizationRoleUser = (OrganizationRoleUserEntity)info.GetValue("_organizationRoleUser", typeof(OrganizationRoleUserEntity));
                if (_organizationRoleUser != null)
                {
                    _organizationRoleUser.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _podDetails = (PodDetailsEntity)info.GetValue("_podDetails", typeof(PodDetailsEntity));
                if (_podDetails != null)
                {
                    _podDetails.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
示例#3
0
 /// <summary> setups the sync logic for member _podDetails</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncPodDetails(IEntity2 relatedEntity)
 {
     if (_podDetails != relatedEntity)
     {
         DesetupSyncPodDetails(true, true);
         _podDetails = (PodDetailsEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_podDetails, new PropertyChangedEventHandler(OnPodDetailsPropertyChanged), "PodDetails", EventPodTeamEntity.Relations.PodDetailsEntityUsingPodId, true, new string[] {  });
     }
 }
示例#4
0
        public void MapMapsEntityIdToPodId()
        {
            const long expectedPodId    = 23845;
            var        podDetailsEntity = new PodDetailsEntity(expectedPodId);

            Pod pod = _podFactory.Map(podDetailsEntity);

            Assert.AreEqual(expectedPodId, pod.Id, "Pod ID mapped incorrectly.");
        }
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _item       = null;
            _podDetails = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
示例#6
0
        public void MapMapsEntityNameToPodName()
        {
            const string expectedName     = "Bob Ross Pod";
            var          podDetailsEntity = new PodDetailsEntity {
                Name = expectedName
            };

            Pod pod = _podFactory.Map(podDetailsEntity);

            Assert.AreEqual(expectedName, pod.Name, "Pod Name mapped incorrectly.");
        }
示例#7
0
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _organizationRoleUser = null;
            _podDetails           = null;
            _staffEventRole       = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
        protected PodInventoryItemEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _item = (ItemEntity)info.GetValue("_item", typeof(ItemEntity));
                if (_item != null)
                {
                    _item.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _podDetails = (PodDetailsEntity)info.GetValue("_podDetails", typeof(PodDetailsEntity));
                if (_podDetails != null)
                {
                    _podDetails.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
示例#9
0
 /// <summary> Removes the sync logic for member _podDetails</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 DesetupSyncPodDetails(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_podDetails, new PropertyChangedEventHandler(OnPodDetailsPropertyChanged), "PodDetails", EventPodTeamEntity.Relations.PodDetailsEntityUsingPodId, true, signalRelatedEntity, "EventPodTeam", resetFKFields, new int[] { (int)EventPodTeamFieldIndex.PodId });
     _podDetails = null;
 }