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

C# MessageFlags类代码示例

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

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



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

示例1: FormatFlagsList

        /// <summary>
        /// Formats a flags list suitable for use with the APPEND command.
        /// </summary>
        /// <returns>The flags list string.</returns>
        /// <param name="flags">The message flags.</param>
        /// <param name="numUserFlags">The number of user-defined flags.</param>
        public static string FormatFlagsList(MessageFlags flags, int numUserFlags)
        {
            var builder = new StringBuilder ();

            builder.Append ('(');

            if ((flags & MessageFlags.Answered) != 0)
                builder.Append ("\\Answered ");
            if ((flags & MessageFlags.Deleted) != 0)
                builder.Append ("\\Deleted ");
            if ((flags & MessageFlags.Draft) != 0)
                builder.Append ("\\Draft ");
            if ((flags & MessageFlags.Flagged) != 0)
                builder.Append ("\\Flagged ");
            if ((flags & MessageFlags.Seen) != 0)
                builder.Append ("\\Seen ");

            for (int i = 0; i < numUserFlags; i++)
                builder.Append ("%S ");

            if (builder.Length > 1)
                builder.Length--;

            builder.Append (')');

            return builder.ToString ();
        }
开发者ID:rajeshwarn,项目名称:MailKit,代码行数:33,代码来源:ImapUtils.cs


示例2: LoggerEventArgs

 public LoggerEventArgs(Int64 time, String tag, MessageFlags flag, String message)
 {
     this.TimeStamp = time;
     this.Tag = tag;
     this.Message = message;
     this.Flags = flag;
 }
开发者ID:zbright,项目名称:RoutingAI,代码行数:7,代码来源:LoggerEventArgs.cs


示例3: LogMessageAttributes

 public LogMessageAttributes(Stream stream)
 {
     Classification = (MessageClass)stream.ReadByte();
     Level = (MessageLevel)stream.ReadByte();
     MessageSuppression = (MessageSuppression)stream.ReadByte();
     Flags = (MessageFlags)stream.ReadByte();
 }
开发者ID:GridProtectionAlliance,项目名称:gsf,代码行数:7,代码来源:LogMessageAttributes.cs


示例4: SendLogMessage

 /// <summary>
 /// Sends a log message to all attached loggers
 /// </summary>
 /// <param name="tag">Tag associated with the message</param>
 /// <param name="format">Format string of the message</param>
 /// <param name="args">Message format arguments</param>
 public static void SendLogMessage(String tag, MessageFlags flags, String format, params Object[] args)
 {
     if (_onLogMessage != null)
     {
         LoggerEventArgs e = new LoggerEventArgs(tag, flags, format, args);
         _onLogMessage(null, e);
     }
 }
开发者ID:zbright,项目名称:RoutingAI,代码行数:14,代码来源:GlobalLogger.cs


示例5: MessageFlagsChangedEventArgs

		/// <summary>
		/// Initializes a new instance of the <see cref="MailKit.MessageFlagsChangedEventArgs"/> class.
		/// </summary>
		/// <remarks>
		/// Creates a new <see cref="MessageFlagsChangedEventArgs"/>.
		/// </remarks>
		/// <param name="index">The message index.</param>
		/// <param name="flags">The message flags.</param>
		/// <param name="userFlags">The user-defined message flags.</param>
		/// <exception cref="System.ArgumentNullException">
		/// <paramref name="userFlags"/> is <c>null</c>.
		/// </exception>
		/// <exception cref="System.ArgumentOutOfRangeException">
		/// <paramref name="index"/> is out of range.
		/// </exception>
		public MessageFlagsChangedEventArgs (int index, MessageFlags flags, HashSet<string> userFlags) : base (index)
		{
			if (userFlags == null)
				throw new ArgumentNullException (nameof (userFlags));

			UserFlags = userFlags;
			Flags = flags;
		}
开发者ID:jstedfast,项目名称:MailKit,代码行数:23,代码来源:MessageFlagsChangedEventArgs.cs


示例6: SendMessageAsync

        /// <summary>
        /// Sends a message to a specific tile to the connected Band device with the provided tile ID, title, body, 
        /// timestamp and with message flags to control how the message is provided.
        /// </summary>
        /// <param name="tileId">The tile identifier.</param>
        /// <param name="title">The message title.</param>
        /// <param name="body">The message body.</param>
        /// <param name="timestamp">The message timestamp.</param>
        /// <param name="messageFlags">The message flags to control how the message is provided to the Band device.</param>
        public async Task SendMessageAsync(Guid tileId, string title, string body, DateTime timestamp, MessageFlags messageFlags)
        {
#if __ANDROID__ || __IOS__
            await Native.SendMessageTaskAsync(tileId.ToNative(), title, body, timestamp, messageFlags.ToNative());
#elif WINDOWS_PHONE_APP
            await Native.SendMessageAsync(tileId.ToNative(), title, body, timestamp, messageFlags.ToNative());
#endif
        }
开发者ID:JamesEarle,项目名称:Microsoft-Band-SDK-Bindings,代码行数:17,代码来源:BandNotificationManager.cs


示例7: Message

 public Message(RemotingPeer peer, RemotingManager remotingManager, Serializer serializer)
 {
     Serializer = serializer;
     Peer = peer;
     RemotingManager = remotingManager;
     Header = new DataHeader(Serializer);
     Flags = MessageFlags.None;
 }
开发者ID:FloodProject,项目名称:flood,代码行数:8,代码来源:Message.cs


示例8: ConvertFlags

 private static PacketFlags ConvertFlags(MessageFlags flags)
 {
     switch (flags)
     {
         case MessageFlags.None:
             return 0;
         case MessageFlags.Encrypted:
             return PacketFlags.Encrypted;
         case MessageFlags.Signed:
             return PacketFlags.Signed;
         case MessageFlags.Compressed:
             return PacketFlags.Compressed;
         default:
             throw new NotImplementedException();
     }
 }
开发者ID:FloodProject,项目名称:flood,代码行数:16,代码来源:SessionRPCPeer.cs


示例9: FormatBody

        protected string FormatBody(object o)
        {
            DataRowView row = (DataRowView)o;
            string html = FormatMsg.FormatMessage(this,row["Message"].ToString(),new MessageFlags(Convert.ToInt32(row["Flags"])));

            if(row["user_Signature"].ToString().Length>0)
            {
                string sig = row["user_signature"].ToString();

                // don't allow any HTML on signatures
                MessageFlags tFlags = new MessageFlags();
                tFlags.IsHTML = false;

                sig = FormatMsg.FormatMessage(this,sig,tFlags);
                html += "<br/><hr noshade/>" + sig;
            }

            return html;
        }
开发者ID:zi-yu,项目名称:orionsbelt,代码行数:19,代码来源:profile.ascx.cs


示例10: SendMessageAsync

        public async Task SendMessageAsync(Guid tileId, string title, string body, DateTimeOffset timestamp, MessageFlags flags, CancellationToken token)
        {
            if (tileId == Guid.Empty)
            {
                throw new ArgumentException(BandResource.NotificationInvalidTileId, "tileId");
            }
            if (string.IsNullOrWhiteSpace(title) && string.IsNullOrWhiteSpace(body))
            {
                throw new ArgumentException(BandResource.NotificationFieldsEmpty);
            }

            await Task.Delay(500);

            var appId = _appIdProvider.GetAppId();
            TileData installedTile = _tiles.GetTile(appId, tileId);

            if (installedTile == null || installedTile.OwnerId != appId)
                throw new Exception("Ownership or Tile invalid");

            return;
        }
开发者ID:MSFTImagine,项目名称:fake-band,代码行数:21,代码来源:FakeBandNotificationManager.cs


示例11: Preview_Click

		/// <summary>
		/// Handles preview button click event.
		/// </summary>
		protected void Preview_Click( object sender, EventArgs e )
		{
			// make preview row visible
			PreviewRow.Visible = true;

			PreviewMessagePost.MessageFlags.IsHtml = _editor.UsesHTML;
			PreviewMessagePost.MessageFlags.IsBBCode = _editor.UsesBBCode;
			PreviewMessagePost.Message = _editor.Text;

			// set message flags
			MessageFlags tFlags = new MessageFlags();
			tFlags.IsHtml = _editor.UsesHTML;
			tFlags.IsBBCode = _editor.UsesBBCode;

			if ( PageContext.BoardSettings.AllowSignatures )
			{
				using ( DataTable userDT = DB.user_list( PageContext.PageBoardID, PageContext.PageUserID, true ) )
				{
					if ( !userDT.Rows [0].IsNull( "Signature" ) )
					{
						PreviewMessagePost.Signature = userDT.Rows [0] ["Signature"].ToString();
					}
				}
			}
		}
开发者ID:coredweller,项目名称:PhishMarket,代码行数:28,代码来源:pmessage.ascx.cs


示例12: QueueAppend

		ImapCommand QueueAppend (FormatOptions options, MimeMessage message, MessageFlags flags, DateTimeOffset? date, CancellationToken cancellationToken, ITransferProgress progress)
		{
			string format = "APPEND %F";

			if ((flags & SettableFlags) != 0)
				format += " " + ImapUtils.FormatFlagsList (flags, 0);

			if (date.HasValue)
				format += " \"" + ImapUtils.FormatInternalDate (date.Value) + "\"";

			format += " %L\r\n";

			var ic = new ImapCommand (Engine, cancellationToken, null, options, format, this, message);
			ic.Progress = progress;

			Engine.QueueCommand (ic);

			return ic;
		}
开发者ID:dcga,项目名称:MailKit,代码行数:19,代码来源:ImapFolder.cs


示例13: Parse

        /// <summary>
        /// Parse the RopTransportNewMailRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopTransportNewMailRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.MessageId = new MessageID();
            this.MessageId.Parse(s);
            this.FolderId = new FolderID();
            this.FolderId.Parse(s);
            this.MessageClass = new MAPIString(Encoding.ASCII);
            this.MessageClass.Parse(s);
            this.MessageFlags = (MessageFlags)ReadUint();
        }
开发者ID:jiaxiaoyan23,项目名称:MAPI-Inspector-for-Fiddler,代码行数:19,代码来源:MSOXCROPS.cs


示例14: Save_Click

		/// <summary>
		/// Handles save button click event. 
		/// </summary>
		protected void Save_Click( object sender, EventArgs e )
		{
			// recipient was set in dropdown
			if ( ToList.Visible ) To.Text = ToList.SelectedItem.Text;
			if ( To.Text.Length <= 0 )
			{
				// recipient is required field
				PageContext.AddLoadMessage( GetText( "need_to" ) );
				return;
			}

			// subject is required
			if ( Subject.Text.Trim().Length <= 0 )
			{
				PageContext.AddLoadMessage( GetText( "need_subject" ) );
				return;
			}
			// message is required
			if ( _editor.Text.Trim().Length <= 0 )
			{
				PageContext.AddLoadMessage( GetText( "need_message" ) );
				return;
			}

			if ( ToList.SelectedItem != null && ToList.SelectedItem.Value == "0" )
			{
				// administrator is sending PMs tp all users

				string body = _editor.Text;
				MessageFlags messageFlags = new MessageFlags();

				messageFlags.IsHtml = _editor.UsesHTML;
				messageFlags.IsBBCode = _editor.UsesBBCode;

				DB.pmessage_save( PageContext.PageUserID, 0, Subject.Text, body, messageFlags.BitValue );

				// redirect to outbox (sent items), not control panel
				YafBuildLink.Redirect( ForumPages.cp_pm, "v={0}", "out" );
			}
			else
			{
				// remove all abundant whitespaces and separators
				To.Text.Trim();
				Regex rx = new Regex( @";(\s|;)*;" );
				To.Text = rx.Replace( To.Text, ";" );
				if ( To.Text.StartsWith( ";" ) ) To.Text = To.Text.Substring( 1 );
				if ( To.Text.EndsWith( ";" ) ) To.Text = To.Text.Substring( 0, To.Text.Length - 1 );
				rx = new Regex( @"\s*;\s*" );
				To.Text = rx.Replace( To.Text, ";" );

				// list of recipients
				List<string> recipients = new List<string>( To.Text.Split( ';' ) );
				// list of recipient's ids
				int [] recipientID = new int [recipients.Count];

				if ( recipients.Count > PageContext.BoardSettings.PrivateMessageMaxRecipients && !PageContext.IsAdmin )
				{
					// to many recipients
					PageContext.AddLoadMessage( String.Format( GetText( "TOO_MANY_RECIPIENTS" ), PageContext.BoardSettings.PrivateMessageMaxRecipients ) );
					return;
				}

				// test sending user's PM count
				if ( PageContext.BoardSettings.MaxPrivateMessagesPerUser != 0 &&
					( DB.user_pmcount( PageContext.PageUserID ) + recipients.Count ) > PageContext.BoardSettings.MaxPrivateMessagesPerUser &&
					!PageContext.IsAdmin )
				{
					// user has full PM box
					PageContext.AddLoadMessage( String.Format( GetText( "OWN_PMBOX_FULL" ), PageContext.BoardSettings.MaxPrivateMessagesPerUser ) );
					return;
				}

				// get recipients' IDs
				for ( int i = 0; i < recipients.Count; i++ )
				{
					using ( DataTable dt = DB.user_find( PageContext.PageBoardID, false, recipients [i], null ) )
					{
						if ( dt.Rows.Count != 1 )
						{
							PageContext.AddLoadMessage( String.Format( GetText( "NO_SUCH_USER" ), recipients [i] ) );
							return;
						}
                        else if (SqlDataLayerConverter.VerifyInt32(dt.Rows [0] ["IsGuest"]) > 0 )						
						{
							PageContext.AddLoadMessage( GetText( "NOT_GUEST" ) );
							return;
						}

						// get recipient's ID from the database
						recipientID [i] = Convert.ToInt32( dt.Rows [0] ["UserID"] );

						// test receiving user's PM count
						if ( PageContext.BoardSettings.MaxPrivateMessagesPerUser != 0 &&
							DB.user_pmcount( recipientID [i] ) >= PageContext.BoardSettings.MaxPrivateMessagesPerUser &&
							!PageContext.IsAdmin )
						{
							// recipient has full PM box
//.........这里部分代码省略.........
开发者ID:coredweller,项目名称:PhishMarket,代码行数:101,代码来源:pmessage.ascx.cs


示例15: Append

		/// <summary>
		/// Appends the specified message to the folder.
		/// </summary>
		/// <remarks>
		/// Appends the specified message to the folder and returns the UniqueId assigned to the message.
		/// </remarks>
		/// <returns>The UID of the appended message, if available; otherwise, <c>null</c>.</returns>
		/// <param name="options">The formatting options.</param>
		/// <param name="message">The message.</param>
		/// <param name="flags">The message flags.</param>
		/// <param name="date">The received date of the message.</param>
		/// <param name="cancellationToken">The cancellation token.</param>
		/// <param name="progress">The progress reporting mechanism.</param>
		/// <exception cref="System.ArgumentNullException">
		/// <para><paramref name="options"/> is <c>null</c>.</para>
		/// <para>-or-</para>
		/// <para><paramref name="message"/> is <c>null</c>.</para>
		/// </exception>
		/// <exception cref="System.ObjectDisposedException">
		/// The <see cref="ImapClient"/> has been disposed.
		/// </exception>
		/// <exception cref="ServiceNotConnectedException">
		/// The <see cref="ImapClient"/> is not connected.
		/// </exception>
		/// <exception cref="ServiceNotAuthenticatedException">
		/// The <see cref="ImapClient"/> is not authenticated.
		/// </exception>
		/// <exception cref="System.InvalidOperationException">
		/// Internationalized formatting was requested but has not been enabled.
		/// </exception>
		/// <exception cref="FolderNotFoundException">
		/// The <see cref="ImapFolder"/> does not exist.
		/// </exception>
		/// <exception cref="System.OperationCanceledException">
		/// The operation was canceled via the cancellation token.
		/// </exception>
		/// <exception cref="System.NotSupportedException">
		/// Internationalized formatting was requested but is not supported by the server.
		/// </exception>
		/// <exception cref="System.IO.IOException">
		/// An I/O error occurred.
		/// </exception>
		/// <exception cref="ImapProtocolException">
		/// The server's response contained unexpected tokens.
		/// </exception>
		/// <exception cref="ImapCommandException">
		/// The server replied with a NO or BAD response.
		/// </exception>
		public override UniqueId? Append (FormatOptions options, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null)
		{
			if (options == null)
				throw new ArgumentNullException ("options");

			if (message == null)
				throw new ArgumentNullException ("message");

			CheckState (false, false);

			if (options.International && (Engine.Capabilities & ImapCapabilities.UTF8Accept) == 0)
				throw new NotSupportedException ("The IMAP server does not support the UTF8 extension.");

			var format = options.Clone ();
			format.NewLineFormat = NewLineFormat.Dos;

			if ((Engine.Capabilities & ImapCapabilities.UTF8Only) == ImapCapabilities.UTF8Only)
				format.International = true;

			if (format.International && !Engine.UTF8Enabled)
				throw new InvalidOperationException ("The UTF8 extension has not been enabled.");

			var ic = QueueAppend (format, message, flags, date, cancellationToken, progress);

			Engine.Wait (ic);

			ProcessResponseCodes (ic, this);

			if (ic.Response != ImapCommandResponse.Ok)
				throw ImapCommandException.Create ("APPEND", ic);

			var append = ic.RespCodes.OfType<AppendUidResponseCode> ().FirstOrDefault ();

			if (append != null)
				return append.UidSet[0];

			return null;
		}
开发者ID:dcga,项目名称:MailKit,代码行数:86,代码来源:ImapFolder.cs


示例16: SetFlags

		/// <summary>
		/// Set the flags of the specified messages only if their mod-sequence value is less than the specified value.
		/// </summary>
		/// <remarks>
		/// Sets the flags of the specified messages only if their mod-sequence value is less than the specified value.
		/// </remarks>
		/// <returns>The unique IDs of the messages that were not updated.</returns>
		/// <param name="uids">The UIDs of the messages.</param>
		/// <param name="modseq">The mod-sequence value.</param>
		/// <param name="flags">The message flags to set.</param>
		/// <param name="userFlags">A set of user-defined flags to set.</param>
		/// <param name="silent">If set to <c>true</c>, no <see cref="MessageFlagsChanged"/> events will be emitted.</param>
		/// <param name="cancellationToken">The cancellation token.</param>
		/// <exception cref="System.ArgumentNullException">
		/// <paramref name="uids"/> is <c>null</c>.
		/// </exception>
		/// <exception cref="System.ArgumentException">
		/// <para><paramref name="uids"/> is empty.</para>
		/// <para>-or-</para>
		/// <para>One or more of the <paramref name="uids"/> is invalid.</para>
		/// </exception>
		/// <exception cref="System.ObjectDisposedException">
		/// The <see cref="IMailStore"/> has been disposed.
		/// </exception>
		/// <exception cref="ServiceNotConnectedException">
		/// The <see cref="IMailStore"/> is not connected.
		/// </exception>
		/// <exception cref="ServiceNotAuthenticatedException">
		/// The <see cref="IMailStore"/> is not authenticated.
		/// </exception>
		/// <exception cref="FolderNotOpenException">
		/// The folder is not currently open in read-write mode.
		/// </exception>
		/// <exception cref="System.NotSupportedException">
		/// The <see cref="MailFolder"/> does not support mod-sequences.
		/// </exception>
		/// <exception cref="System.OperationCanceledException">
		/// The operation was canceled via the cancellation token.
		/// </exception>
		/// <exception cref="System.IO.IOException">
		/// An I/O error occurred.
		/// </exception>
		/// <exception cref="ProtocolException">
		/// The server's response contained unexpected tokens.
		/// </exception>
		/// <exception cref="CommandException">
		/// The command failed.
		/// </exception>
		public abstract IList<UniqueId> SetFlags (IList<UniqueId> uids, ulong modseq, MessageFlags flags, HashSet<string> userFlags, bool silent, CancellationToken cancellationToken = default (CancellationToken));
开发者ID:naeemkhedarun,项目名称:MailKit,代码行数:49,代码来源:MailFolder.cs


示例17: ModifyFlags

		IList<int> ModifyFlags (IList<int> indexes, ulong? modseq, MessageFlags flags, HashSet<string> userFlags, string action, CancellationToken cancellationToken)
		{
			var flaglist = ImapUtils.FormatFlagsList (flags & PermanentFlags, userFlags != null ? userFlags.Count : 0);
			var userFlagList = userFlags != null ? userFlags.ToArray () : new object[0];
			var set = ImapUtils.FormatIndexSet (indexes);

			if (modseq.HasValue && !SupportsModSeq)
				throw new NotSupportedException ("The ImapFolder does not support mod-sequences.");

			CheckState (true, true);

			if (indexes.Count == 0)
				return new int[0];

			string @params = string.Empty;
			if (modseq.HasValue)
				@params = string.Format (" (UNCHANGEDSINCE {0})", modseq.Value);

			var format = string.Format ("STORE {0}{1} {2} {3}\r\n", set, @params, action, flaglist);
			var ic = Engine.QueueCommand (cancellationToken, this, format, userFlagList);

			Engine.Wait (ic);

			ProcessResponseCodes (ic, null);

			if (ic.Response != ImapCommandResponse.Ok)
				throw ImapCommandException.Create ("STORE", ic);

			if (modseq.HasValue) {
				var modified = ic.RespCodes.OfType<ModifiedResponseCode> ().FirstOrDefault ();

				if (modified != null) {
					var unmodified = new int[modified.UidSet.Count];
					for (int i = 0; i < unmodified.Length; i++)
						unmodified[i] = (int) (modified.UidSet[i].Id - 1);

					return unmodified;
				}
			}

			return new int[0];
		}
开发者ID:dcga,项目名称:MailKit,代码行数:42,代码来源:ImapFolder.cs


示例18: UpdateAcceptedFlags

		internal void UpdateAcceptedFlags (MessageFlags flags)
		{
			AcceptedFlags = flags;
		}
开发者ID:dcga,项目名称:MailKit,代码行数:4,代码来源:ImapFolder.cs


示例19: RemoveFlags

		/// <summary>
		/// Removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value.
		/// </summary>
		/// <remarks>
		/// Removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value.
		/// </remarks>
		/// <returns>The indexes of the messages that were not updated.</returns>
		/// <param name="indexes">The indexes of the messages.</param>
		/// <param name="modseq">The mod-sequence value.</param>
		/// <param name="flags">The message flags to remove.</param>
		/// <param name="userFlags">A set of user-defined flags to remove.</param>
		/// <param name="silent">If set to <c>true</c>, no <see cref="MailFolder.MessageFlagsChanged"/> events will be emitted.</param>
		/// <param name="cancellationToken">The cancellation token.</param>
		/// <exception cref="System.ArgumentNullException">
		/// <paramref name="indexes"/> is <c>null</c>.
		/// </exception>
		/// <exception cref="System.ArgumentException">
		/// <para><paramref name="indexes"/> is empty.</para>
		/// <para>-or-</para>
		/// <para>One or more of the <paramref name="indexes"/> is invalid.</para>
		/// <para>-or-</para>
		/// <para>No flags were specified.</para>
		/// </exception>
		/// <exception cref="System.ObjectDisposedException">
		/// The <see cref="ImapClient"/> has been disposed.
		/// </exception>
		/// <exception cref="ServiceNotConnectedException">
		/// The <see cref="ImapClient"/> is not connected.
		/// </exception>
		/// <exception cref="ServiceNotAuthenticatedException">
		/// The <see cref="ImapClient"/> is not authenticated.
		/// </exception>
		/// <exception cref="FolderNotOpenException">
		/// The <see cref="ImapFolder"/> is not currently open in read-write mode.
		/// </exception>
		/// <exception cref="System.NotSupportedException">
		/// The <see cref="ImapFolder"/> does not support mod-sequences.
		/// </exception>
		/// <exception cref="System.OperationCanceledException">
		/// The operation was canceled via the cancellation token.
		/// </exception>
		/// <exception cref="System.IO.IOException">
		/// An I/O error occurred.
		/// </exception>
		/// <exception cref="ImapProtocolException">
		/// The server's response contained unexpected tokens.
		/// </exception>
		/// <exception cref="ImapCommandException">
		/// The server replied with a NO or BAD response.
		/// </exception>
		public override IList<int> RemoveFlags (IList<int> indexes, ulong modseq, MessageFlags flags, HashSet<string> userFlags, bool silent, CancellationToken cancellationToken = default (CancellationToken))
		{
			if ((flags & SettableFlags) == 0 && (userFlags == null || userFlags.Count == 0))
				throw new ArgumentException ("No flags were specified.", "flags");

			return ModifyFlags (indexes, modseq, flags, userFlags, silent ? "-FLAGS.SILENT" : "-FLAGS", cancellationToken);
		}
开发者ID:dcga,项目名称:MailKit,代码行数:57,代码来源:ImapFolder.cs


示例20: SetFlagsAsync

		/// <summary>
		/// Asynchronously set the flags of the specified message.
		/// </summary>
		/// <remarks>
		/// Asynchronously sets the flags of the specified message.
		/// </remarks>
		/// <returns>An asynchronous task context.</returns>
		/// <param name="uid">The UID of the message.</param>
		/// <param name="flags">The message flags to set.</param>
		/// <param name="userFlags">A set of user-defined flags to set.</param>
		/// <param name="silent">If set to <c>true</c>, no <see cref="MessageFlagsChanged"/> events will be emitted.</param>
		/// <param name="cancellationToken">The cancellation token.</param>
		/// <exception cref="System.ArgumentException">
		/// <paramref name="uid"/> is invalid.
		/// </exception>
		/// <exception cref="System.ObjectDisposedException">
		/// The <see cref="IMailStore"/> has been disposed.
		/// </exception>
		/// <exception cref="ServiceNotConnectedException">
		/// The <see cref="IMailStore"/> is not connected.
		/// </exception>
		/// <exception cref="ServiceNotAuthenticatedException">
		/// The <see cref="IMailStore"/> is not authenticated.
		/// </exception>
		/// <exception cref="FolderNotOpenException">
		/// The folder is not currently open in read-write mode.
		/// </exception>
		/// <exception cref="System.OperationCanceledException">
		/// The operation was canceled via the cancellation token.
		/// </exception>
		/// <exception cref="System.IO.IOException">
		/// An I/O error occurred.
		/// </exception>
		/// <exception cref="ProtocolException">
		/// The server's response contained unexpected tokens.
		/// </exception>
		/// <exception cref="CommandException">
		/// The command failed.
		/// </exception>
		public Task SetFlagsAsync (UniqueId uid, MessageFlags flags, HashSet<string> userFlags, bool silent, CancellationToken cancellationToken = default (CancellationToken))
		{
			return SetFlagsAsync (new [] { uid }, flags, userFlags, silent, cancellationToken);
		}
开发者ID:naeemkhedarun,项目名称:MailKit,代码行数:43,代码来源:MailFolder.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# MessageHandler类代码示例发布时间:2022-05-24
下一篇:
C# MessageFault类代码示例发布时间: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