• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# MessageStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Message

	    public Message(Guid messageToken, Guid messageId, DateTime date, long receiverId, long senderId, string text, byte[] thumbnail, MessageStatus status, MessageType type = MessageType.Text)
	    {
	        Recipient = receiverId;
	        Sender = senderId;
	        Text = text;
	        Thumbnail = thumbnail;
            MessageId = messageId;
			MessageToken = messageToken;
	        Date = date;
	        Type = type;
	        Status = status;
	    }
开发者ID:richardboegli,项目名称:KinderChat,代码行数:12,代码来源:Message.cs


示例17: WorkaroundChangeNotificationForDir

 internal static MessageStatus WorkaroundChangeNotificationForDir(bool allEntriesFitBufSize, MessageStatus returnedStatus, ITestSite site)
 {
     if (!allEntriesFitBufSize)
     {
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(1399, MessageStatus.NOTIFY_ENUM_DIR, returnedStatus, site);
     }
     else if (allEntriesFitBufSize)
     {
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(1399, MessageStatus.SUCCESS, returnedStatus, site);
     }
     return returnedStatus;
 }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:12,代码来源:SMB2_TDIWorkaround.cs


示例18: ChatMessage

		internal ChatMessage(string senderId, string sender, string text, MessageStatus status)
		{
			if (sender == null || senderId == null)
			{
				throw new System.ArgumentException("The senderId and sender values cannot be null.");
			}
			this.senderId = senderId;
			this.senderAlias = sender;
			this.text = text;
			this.id = UUID.randomUUID();
			this.status = status;
		}
开发者ID:moljac,项目名称:Samples.Data.Porting,代码行数:12,代码来源:ChatMessage.cs


示例19: MessageBuilder

 public MessageBuilder()
 {
     messageId = Guid.NewGuid().ToString();
     criticalTime = TimeSpan.FromSeconds(5);
     deliveryTime = TimeSpan.FromSeconds(4);
     processingTime = TimeSpan.FromSeconds(3);
     messageType = typeof(SubmitOrder);
     messageStatus = MessageStatus.Successful;
     timeSent = DateTime.Now.AddMinutes(-5);
     conversationId = Guid.NewGuid().ToString();
     headers = new List<StoredMessageHeader>();
     receivingEndpoint = null;
     sendingEndpoint = null;
 }
开发者ID:AlexRhees,项目名称:ServiceInsight,代码行数:14,代码来源:MessageBuilder.cs


示例20: Process

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MessageSummaryItems类代码示例发布时间:2022-05-24
下一篇:
C# MessageReader类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap