/// <summary>
        /// Get the corresponding AbstractFastTransferStream.
        /// </summary>
        /// <returns>The corresponding AbstractFastTransferStream.</returns>
        public AbstractFastTransferStream GetAbstractFastTransferStream()
        {
            AbstractFastTransferStream abstractFastTransferStream = new AbstractFastTransferStream
            {
                StreamType = FastTransferStreamType.MessageList
            };
            AbstractMessageList abstractMessageList = new AbstractMessageList
            {
                IsPidTagEcWarningOut = this.ErrorCodeList.Count != 0
            };

            // If ErrorCodeList contains values, it means PidTagEcWaring is out in model level.
            // Since ErrorCodeList contains PidTagEcWaring values, each value is after a PidTagEcWaring.

            // Beside checking permission, each MessageList contains at least 1 message.
            abstractMessageList.AbsMessage.AbsMessageContent.IsNoPermissionMessageNotOut = !(this.Messages != null && this.Messages.Count > 0);
            abstractFastTransferStream.AbstractMessageList = abstractMessageList;
            return abstractFastTransferStream;
        }
Пример #2
0
        /// <summary>
        /// Get the corresponding AbstractFastTransferStream.
        /// </summary>
        /// <returns>The corresponding AbstractFastTransferStream.</returns>
        public AbstractFastTransferStream GetAbstractFastTransferStream()
        {
            AbstractFastTransferStream abstractFastTransferStream = new AbstractFastTransferStream
            {
                StreamType = FastTransferStreamType.MessageList
            };
            AbstractMessageList abstractMessageList = new AbstractMessageList
            {
                IsPidTagEcWarningOut = this.ErrorCodeList.Count != 0
            };

            // If ErrorCodeList contains values, it means PidTagEcWaring is out in model level.
            // Since ErrorCodeList contains PidTagEcWaring values, each value is after a PidTagEcWaring.

            // Beside checking permission, each MessageList contains at least 1 message.
            abstractMessageList.AbsMessage.AbsMessageContent.IsNoPermissionMessageNotOut = !(this.Messages != null && this.Messages.Count > 0);
            abstractFastTransferStream.AbstractMessageList = abstractMessageList;
            return(abstractFastTransferStream);
        }