Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TypeSettingStatus"/> class.
 /// </summary>
 public TypeSettingStatus()
 {
     MessageInfo           = new TypeSpecificMessageCountInfo();
     GatherStatistics      = true;
     BulkInMessageInfo     = new BulkMessageInfo();
     BulkOutMessageInfo    = new BulkMessageInfo();
     TTLSettingStatus      = new TTLSettingStatus();
     HydrationPolicyStatus = new HydrationPolicyStatus();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns a copy of the <see cref="HydrationPolicyStatus"/> or null if it is not specified.
        /// </summary>
        /// <returns>A copy of the <see cref="HydrationPolicyStatus"/> or null if if it is not specified.</returns>
        internal HydrationPolicyStatus GetStatus()
        {
            HydrationPolicyStatus status = null;

            if (_isSpecified == true)
            {
                status = new HydrationPolicyStatus();
                status = this.Clone();
            }
            return(status);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates a clone of this <see cref="HydrationPolicyStatus"/>.
        /// </summary>
        /// <returns>
        /// <para>A cloned <see cref="HydrationPolicyStatus"/> object that shares no object
        ///		references as this instance; never <see langword="null"/>.
        /// </para>
        /// </returns>
        public HydrationPolicyStatus Clone()
        {
            HydrationPolicyStatus status = new HydrationPolicyStatus();

            status.HydrateOnBulkMiss = HydrateOnBulkMiss;
            status.HydrateOnMiss     = HydrateOnMiss;
            status.KeyType           = KeyType;
            status._isSpecified      = _isSpecified;

            return(status);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Returns a copy of the <see cref="TypeSettingStatus"/> without items that are not used.
        /// This is to ensure XML output will exclude unused items.
        /// </summary>
        /// <returns>A copy of the <see cref="TypeSettingStatus"/> without items that are not used.</returns>
        internal TypeSettingStatus GetStatus()
        {
            TypeSettingStatus typeSettingStatus = new TypeSettingStatus();

            typeSettingStatus.TypeName              = TypeName;
            typeSettingStatus.TypeId                = TypeId;
            typeSettingStatus.Disabled              = Disabled;
            typeSettingStatus.Compress              = Compress;
            typeSettingStatus.GroupName             = GroupName;
            typeSettingStatus.RelatedIndexTypeId    = RelatedIndexTypeId;
            typeSettingStatus.CheckRaceCondition    = CheckRaceCondition;
            typeSettingStatus.TTLSettingStatus      = TTLSettingStatus.GetStatus();
            typeSettingStatus.SyncInMessages        = SyncInMessages;
            typeSettingStatus.ThrowOnSyncFailure    = ThrowOnSyncFailure;
            typeSettingStatus.GatherStatistics      = GatherStatistics;
            typeSettingStatus.Description           = Description;
            typeSettingStatus.HydrationPolicyStatus = HydrationPolicyStatus.GetStatus();
            typeSettingStatus.BulkInMessageInfo     = BulkInMessageInfo.GetStatus();
            typeSettingStatus.BulkOutMessageInfo    = BulkOutMessageInfo.GetStatus();
            typeSettingStatus.MessageInfo           = MessageInfo.GetStatus();

            return(typeSettingStatus);
        }
Exemplo n.º 5
0
        /// <summary>
        /// This method populates the <see cref="TypeSettingStatus"/> with
        /// <see cref="TypeSetting"/> information.  If <see cref="TypeSetting"/> is
        /// <see langword="null"/> then nothing is updated.
        /// </summary>
        /// <param name="ts">The <see cref="TypeSetting"/> to convert.</param>
        internal void Update(TypeSetting ts)
        {
            if (ts == null)
            {
                return;
            }

            TypeName           = ts.TypeName;
            TypeId             = ts.TypeId;
            Disabled           = ts.Disabled;
            Compress           = ts.Compress;
            GroupName          = ts.GroupName;
            RelatedIndexTypeId = ts.RelatedIndexTypeId;
            CheckRaceCondition = ts.CheckRaceCondition;
            TTLSettingStatus   = new TTLSettingStatus();
            TTLSettingStatus.Update(ts.TTLSetting);

            SyncInMessages        = ts.SyncInMessages;
            ThrowOnSyncFailure    = ts.ThrowOnSyncFailure;
            GatherStatistics      = ts.GatherStatistics;
            Description           = ts.Description;
            HydrationPolicyStatus = new HydrationPolicyStatus();
            HydrationPolicyStatus.Update(ts.HydrationPolicy);
        }