当前位置: 首页>>代码示例>>C#>>正文


C# MessageStatus类代码示例

本文整理汇总了C#中MessageStatus的典型用法代码示例。如果您正苦于以下问题:C# MessageStatus类的具体用法?C# MessageStatus怎么用?C# MessageStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MessageStatus类属于命名空间,在下文中一共展示了MessageStatus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TextMessage

 /// <summary>Initializes a new instance of the <see cref="TextMessage"/> class.</summary>
 /// <param name="_message">The message.</param>
 /// <param name="fromNumber">The number.</param>
 /// <param name="toNumber"></param>
 /// <param name="_dateTime">The date time.</param>
 /// <param name="_sentOrRecieved">The sent or recieved status.</param>
 /// <param name="_filePath">Path of the file.</param>
 public TextMessage(MessageFormat format, string _message, string fromNumber, string toNumber, DateTime _dateTime, MessageStatus _sentOrRecieved, string _filePath)
     : base(_message, fromNumber, toNumber, _dateTime)
 {
     Format = format;
     sentOrRecieved = _sentOrRecieved;
     filePath = _filePath;
 }
开发者ID:Bhavesh-Patel,项目名称:TextMessageViewer,代码行数:14,代码来源:TextMessage.cs

示例2: MessageEventArgs

 public MessageEventArgs(string message, int queuedMessageCount, MessageStatus status, string error)
 {
     _message = message;
     _queuedMessageCount = queuedMessageCount;
     _status = status;
     _error = error;
 }
开发者ID:ViniciusConsultor,项目名称:geansoft,代码行数:7,代码来源:EventArgs.cs

示例3: ErrorFsctlrvRequestResumeKeyResponse

        public static void ErrorFsctlrvRequestResumeKeyResponse(int messageId, MessageStatus messageStatus)
        {
            Condition.IsTrue(smbConnection.sentRequest.ContainsKey(messageId));
            Condition.IsTrue((messageStatus == MessageStatus.NetworkSessionExpired)
                                || (messageStatus == MessageStatus.NotSupported));
            Condition.IsTrue(smbConnection.sentRequest[messageId].command == Command.FsctlSrvRequestResumeKey);
            FsctlSrvResumeKeyRequest request = (FsctlSrvResumeKeyRequest)smbConnection.sentRequest[messageId];

            if (messageStatus == MessageStatus.NetworkSessionExpired)
            {
                smbConnection.sessionList.Remove(request.sessionId);
                smbState = SmbState.Closed;
            }
            else if (messageStatus == MessageStatus.NotSupported)
            {
                // As input paramter is valid, that the SUT still reuturn error code indicates that the SUT does not
                // support this operation.
                if (!Parameter.isSupportResumeKey)
                {
                    ModelHelper.CaptureRequirement(
                        30023,
                        @"[In Receiving an FSCTL_SRV_REQUEST_RESUME_KEY Function Code] If this operation [Receiving an
                        FSCTL_SRV_REQUEST_RESUME_KEY Function Code] is successful, then the server MUST construct an
                        FSCTL_SRV_CHOPYCHUNK response as specified in section 2.2.7.2.2, with the following additional
                        requirements: If the server does not support this operation [Receiving an
                        FSCTL_SRV_REQUEST_RESUME_KEY Function Code], then it MUST fail the request with
                        STATUS_NOT_SUPPORTED.");
                }
                smbState = SmbState.End;
            }
            smbConnection.sentRequest.Remove(messageId);
        }
开发者ID:pyq881120,项目名称:WindowsProtocolTestSuites,代码行数:32,代码来源:NTTransactionModel.cs

示例4: GetMessageByFilter

        public IEnumerable<MessageWrapper> GetMessageByFilter(int projectid, int tag, Guid departament, Guid participant,
                                                              ApiDateTime createdStart, ApiDateTime createdStop, int lastId,
                                                              bool myProjects, bool follow, MessageStatus? status)
        {
            var messageEngine = EngineFactory.GetMessageEngine();
            var taskFilter = new TaskFilter
            {
                DepartmentId = departament,
                UserId = participant,
                FromDate = createdStart,
                ToDate = createdStop,
                SortBy = _context.SortBy,
                SortOrder = !_context.SortDescending,
                SearchText = _context.FilterValue,
                TagId = tag,
                Offset = _context.StartIndex,
                Max = _context.Count,
                MyProjects = myProjects,
                LastId = lastId,
                Follow = follow,
                MessageStatus = status
            };

            if (projectid != 0)
                taskFilter.ProjectIds.Add(projectid);

            _context.SetDataPaginated();
            _context.SetDataFiltered();
            _context.SetDataSorted();
            _context.TotalCount = messageEngine.GetByFilterCount(taskFilter);

            return messageEngine.GetByFilter(taskFilter).NotFoundIfNull().Select(r => new MessageWrapper(r)).ToSmartList();
        }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:33,代码来源:ProjectApi.Messages.cs

示例5: MessageErrorInfo

 public MessageErrorInfo(MessageStatus status)
 {
     _statusSpecified = true;
     Status = status;
     Image = GetImage();
     Description = status.GetDescription();
 }
开发者ID:nanohex,项目名称:ServiceInsight,代码行数:7,代码来源:MessageErrorInfo.cs

示例6: FindPagedMessagesBySiteAndStatusAndType

        /// <summary>
        /// Retrieve a list of messages by status and type
        /// </summary>
        /// <param name="status"></param>
        /// <param name="type"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public Paginator<Message> FindPagedMessagesBySiteAndStatusAndType(Site site, MessageStatus status, MessageType type, string orderBy, bool orderAscending, int pageSize)
        {
            DetachedCriteria criteria = DetachedCriteria.For<Message>()
                                       .AddOrder(new Order(orderBy, orderAscending))
                                       .Add(Restrictions.Eq("Site", site));

             return Repository<Message>.GetPaginator(criteria, pageSize);
        }
开发者ID:aozora,项目名称:arashi,代码行数:15,代码来源:MessageService.cs

示例7: Process

		public void Process(MessageQueue msgQueue)
		{
			if (IsValid)
			{
				vStatus = MessageStatus.Processing;
				vProcessor(msgQueue, this);
			}
		}
开发者ID:mind0n,项目名称:hive,代码行数:8,代码来源:MessageObject.cs

示例8: RemoveFlag_ShouldRemoveSingleFlag

        public void RemoveFlag_ShouldRemoveSingleFlag()
        {
            _status = _status.RemoveFlag(MessageStatus.New);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.False);
        }
开发者ID:xlongtang,项目名称:nextra,代码行数:8,代码来源:Enum_ExtensionsBehavior.cs

示例9: RemoveFlag_ShouldChainMultipleFlags

        public void RemoveFlag_ShouldChainMultipleFlags()
        {
            _status = _status.AddFlag(MessageStatus.Sent).AddFlag(MessageStatus.Received).RemoveFlag(MessageStatus.New);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.True);
        }
开发者ID:xlongtang,项目名称:nextra,代码行数:8,代码来源:Enum_ExtensionsBehavior.cs

示例10: AddFlag_ShouldAddSingleFlag

        public void AddFlag_ShouldAddSingleFlag()
        {
            _status = _status.AddFlag(MessageStatus.Sent);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.False);
        }
开发者ID:xlongtang,项目名称:nextra,代码行数:8,代码来源:Enum_ExtensionsBehavior.cs

示例11: AddFlag_ShouldChainMultipleFlags

        public void AddFlag_ShouldChainMultipleFlags()
        {
            status = status.AddFlag(MessageStatus.Sent).AddFlag(MessageStatus.Received);

            Assert.That(status.HasFlag(MessageStatus.New), Is.True);
            Assert.That(status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(status.HasFlag(MessageStatus.Received), Is.True);
        }
开发者ID:EdsonF,项目名称:nextra,代码行数:8,代码来源:Enum_ExtensionsBehavior.cs

示例12: ErrorFindFirst2Response

        public static void ErrorFindFirst2Response(int messageId, MessageStatus messageStatus)
        {
            Condition.IsTrue(smbConnection.sentRequest.ContainsKey(messageId));
            Condition.IsTrue(messageStatus == MessageStatus.NetworkSessionExpired
                                || messageStatus == MessageStatus.NotSupported
                                || messageStatus == MessageStatus.ObjectNameNotFound
                                || messageStatus == MessageStatus.InvalidParameter);

            Condition.IsTrue(smbConnection.sentRequest[messageId].command == Command.TransFindFirst2);
            Trans2FindFirst2Request request = (Trans2FindFirst2Request)smbConnection.sentRequest[messageId];
            switch (messageStatus)
            {
                case MessageStatus.NotSupported:
                    Condition.IsTrue(Parameter.sutPlatform == Platform.NonWindows);
                    Condition.IsTrue(request.gmtTokenIndex != -1);

                    if (request.informationLevel == InformationLevel.SmbFindFileIdBothDirectoryInfo
                            || request.informationLevel == InformationLevel.SmbFindFileIdFullDirectoryInfo)
                    {
                        ModelHelper.CaptureRequirement(
                            4898,
                            "[In Receiving a TRANS2_FIND_FIRST2 Request New Information Levels]If the server does not " +
                            "support the new Information Levels, then it MUST fail the operation with " +
                            "STATUS_NOT_SUPPORTED.<124>");
                    }
                    smbState = SmbState.End;
                    break;
                case MessageStatus.ObjectNameNotFound:
                    if (request.informationLevel == InformationLevel.SmbFindFileIdBothDirectoryInfo
                            || request.informationLevel == InformationLevel.SmbFindFileIdFullDirectoryInfo)
                    {
                        Condition.IsTrue(Parameter.sutPlatform != Platform.NonWindows);
                    }
                    Condition.IsTrue(request.gmtTokenIndex == -1);
                    Condition.IsTrue(request.isFlagsKnowsLongNameSet);
                    smbState = SmbState.End;
                    break;
                case MessageStatus.NetworkSessionExpired:
                    smbConnection.sessionList.Remove(request.sessionId);
                    smbState = SmbState.Closed;
                    break;
                case MessageStatus.InvalidParameter:
                    if (!request.isFlagsKnowsLongNameSet
                            && request.informationLevel != InformationLevel.SmbInfoStandard)
                    {
                        ModelHelper.CaptureRequirement(
                            9280,
                            @"[In Client Request Extensions] InformationLevel (2 bytes): If a client that has not
                            negotiated long names support requests an InformationLevel other than SMB_INFO_STANDARD,
                            then the server MUST return a status of STATUS_INVALID_PARAMETER(ERRDOS/ERRinvalidparam).");
                    }
                    smbState = SmbState.End;
                    break;
                default:
                    break;
            }
            smbConnection.sentRequest.Remove(messageId);
        }
开发者ID:LiuXiaotian,项目名称:WindowsProtocolTestSuites,代码行数:58,代码来源:Transaction2Model.cs

示例13: ClientDataMessage

 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="fullPath">Full path to the file</param>
 /// <param name="status">Current status of this data message</param>
 public ClientDataMessage(string fullPath, MessageStatus status)
 {
     this.FullPath = fullPath;
     if (!string.IsNullOrEmpty(this.FullPath))
     {
         this.Name = Path.GetFileName(this.FullPath);
     }
     this.MessageStatus = status;
 }
开发者ID:Microsoft,项目名称:Dynamics-AX-Integration,代码行数:14,代码来源:ClientDataMessage.cs

示例14: VerifyFileStandardInformation

        /// <summary>
        /// Verify file standard information 
        /// </summary>
        /// <param name="info">An instance of FileStandardInformation</param>
        /// <param name="status">An instance of MessageStatus</param>
        private void VerifyFileStandardInformation(FileStandardInformation info, MessageStatus status)
        {
            if (this.fileSystem == FileSystem.NTFS)
            {
                //
                // Add the debug information
                //
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-FSA_R46036 Actual FileSystem: {0}", fileSystem);

                //
                // Verify MS-FSA requirement: MS-FSA_R46036
                //
                Site.CaptureRequirementIfAreEqual <MessageStatus>(
                    MessageStatus.SUCCESS,
                    status,
                    46036,
                    @"[In FileStandardInformation] <58> Section 3.1.5.11.27: This algorithm is implemented by NTFS. ");
            }

            if (this.fileSystem == FileSystem.FAT
                || this.fileSystem == FileSystem.EXFAT
                || this.fileSystem == FileSystem.CDFS
                || this.fileSystem == FileSystem.UDFS)
            {
                //
                // Add the debug information
                //
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-FSA_R4637");

                //
                // Verify MS-FSA requirement: MS-FSA_R4637
                //
                Site.CaptureRequirementIfAreEqual<uint>(
                    1,
                    info.NumberOfLinks,
                    4637,
                    @"[In FileStandardInformation] <58> Section 3.1.5.11.27:The FAT, EXFAT, CDFS, and UDFS file systems always return 1.");
            }

            if (info.NumberOfLinks == 0)
            {
                //
                // Add the debug information
                //
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-FSA_R2746");

                //
                // Verify MS-FSA requirement: MS-FSA_R2746
                //
                Site.CaptureRequirementIfAreEqual<byte>(
                    1,
                    info.DeletePending,
                    2746,
                    @"[In FileStandardInformation,Pseudocode for the operation is as follows:]If alignmentInfo.NumberOfLinks is 0,
                    set alignmentInfo.DeletePending to 1.");
            }
        }
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:62,代码来源:ServerRoleCaptureCode.cs

示例15: IsCurrentTransportSupportIntegrity

 /// <summary>
 /// To check if current transport supports Integrity.
 /// </summary>
 /// <param name="status">NTStatus code to compare with expected status.</param>
 /// <returns>Return True if supported, False if not supported.</returns>
 private bool IsCurrentTransportSupportIntegrity(MessageStatus status)
 {
     if (this.fsaAdapter.Transport == Transport.SMB)
     {
         this.fsaAdapter.AssertAreEqual(this.Manager, MessageStatus.NOT_SUPPORTED, status,
             "This operation is not supported for SMB transport.");
         return false;
     }
     return true;
 }
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:15,代码来源:FsCtlTestCases.cs


注:本文中的MessageStatus类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。