コード例 #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();
 }
コード例 #2
0
        /// <summary>
        /// Returns a copy of the <see cref="TTLSettingStatus"/> or null if it is not enabled.
        /// </summary>
        /// <returns>A copy of the <see cref="TTLSettingStatus"/> or null if if it is not enabled.</returns>
        internal TTLSettingStatus GetStatus()
        {
            TTLSettingStatus status = null;

            if (_isSpecified == true)
            {
                status = this.Clone();
            }
            return(status);
        }
コード例 #3
0
        /// <summary>
        /// Creates a clone of this <see cref="TTLSettingStatus"/>.
        /// </summary>
        /// <returns>
        /// <para>A cloned <see cref="TTLSettingStatus"/> object that shares no object
        ///		references as this instance; never <see langword="null"/>.
        /// </para>
        /// </returns>
        internal TTLSettingStatus Clone()
        {
            TTLSettingStatus status = new TTLSettingStatus();

            status.Enabled           = Enabled;
            status.DefaultTTLSeconds = DefaultTTLSeconds;
            status._isSpecified      = _isSpecified;

            return(status);
        }
コード例 #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);
        }
コード例 #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);
        }