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


C# MessageQueueTransactionType类代码示例

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


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

示例1: MsmqMessageDeliveryQueue

 public MsmqMessageDeliveryQueue(string path, MessageQueueTransactionType transactionType, IMessageFormatter formatter)
 {
     _queue = new MessageQueue(path);
     _formatter = new MessageDeliveryFormatter();
     _transactionType = transactionType;
     _formatter = formatter;
 }
开发者ID:jezell,项目名称:iserviceoriented,代码行数:7,代码来源:MsmqMessageDeliveryQueue.cs

示例2: ValidateMessageQueueTransactionType

 public static bool ValidateMessageQueueTransactionType(MessageQueueTransactionType value)
 {
     if ((value != MessageQueueTransactionType.None) && (value != MessageQueueTransactionType.Automatic))
     {
         return (value == MessageQueueTransactionType.Single);
     }
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:ValidationUtility.cs

示例3: ValidateMessageQueueTransactionType

 public static bool ValidateMessageQueueTransactionType(MessageQueueTransactionType value)
 {
     //
     // note that MessageQueueTransactionType has disjoined values
     //
     return (value == MessageQueueTransactionType.None) ||
            (value == MessageQueueTransactionType.Automatic) ||
            (value == MessageQueueTransactionType.Single);
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:9,代码来源:ValidationUtility.cs

示例4: MsmqTraceListener

        /// <summary>
        /// Initializes a new instance of <see cref="MsmqTraceListener"/>.
        /// </summary>
        /// <param name="name">The name of the new instance.</param>
        /// <param name="queuePath">The path to the queue to deliver to.</param>
        /// <param name="formater">The formatter to use.</param>
        /// <param name="messagePriority">The priority for the messages to send.</param>
        /// <param name="recoverable">The recoverable flag for the messages to send.</param>
        /// <param name="timeToReachQueue">The timeToReachQueue for the messages to send.</param>
        /// <param name="timeToBeReceived">The timeToBeReceived for the messages to send.</param>
        /// <param name="useAuthentication">The useAuthentication flag for the messages to send.</param>
        /// <param name="useDeadLetterQueue">The useDeadLetterQueue flag for the messages to send.</param>
        /// <param name="useEncryption">The useEncryption flag for the messages to send.</param>
        /// <param name="transactionType">The <see cref="MessageQueueTransactionType"/> for the message to send.</param>
        public MsmqTraceListener(string name, string queuePath, ILogFormatter formater,
								 MessagePriority messagePriority, bool recoverable,
								 TimeSpan timeToReachQueue, TimeSpan timeToBeReceived,
								 bool useAuthentication, bool useDeadLetterQueue, bool useEncryption,
								 MessageQueueTransactionType transactionType)
            : this(name, queuePath, formater, messagePriority, recoverable,
				   timeToReachQueue, timeToBeReceived,
				   useAuthentication, useDeadLetterQueue, useEncryption,
				   transactionType, new MsmqSendInterfaceFactory())
        {
        }
开发者ID:bnantz,项目名称:NCS-V2-0,代码行数:25,代码来源:MsmqTraceListener.cs

示例5: TryReceive

        protected bool TryReceive(MessageQueueTransactionType transactionType, out Message message)
        {
            try
            {
                message = inputQueue.Receive(TimeSpan.FromMilliseconds(10), transactionType);

                return true;
            }
            catch (MessageQueueException ex)
            {
                if (ex.MessageQueueErrorCode == MessageQueueErrorCode.IOTimeout)
                {
                    //We should only get an IOTimeout exception here if another process removed the message between us peeking and now.
                    message = null;
                    return false;
                }
                throw;
            }
        }
开发者ID:Particular,项目名称:NServiceBus,代码行数:19,代码来源:ReceiveStrategy.cs

示例6: MsmqTraceListener

		/// <summary>
		/// Initializes a new instance of <see cref="MsmqTraceListener"/>.
		/// </summary>
		/// <param name="name">The name of the new instance.</param>
		/// <param name="queuePath">The path to the queue to deliver to.</param>
		/// <param name="formater">The formatter to use.</param>
		/// <param name="messagePriority">The priority for the messages to send.</param>
		/// <param name="recoverable">The recoverable flag for the messages to send.</param>
		/// <param name="timeToReachQueue">The timeToReachQueue for the messages to send.</param>
		/// <param name="timeToBeReceived">The timeToBeReceived for the messages to send.</param>
		/// <param name="useAuthentication">The useAuthentication flag for the messages to send.</param>
		/// <param name="useDeadLetterQueue">The useDeadLetterQueue flag for the messages to send.</param>
		/// <param name="useEncryption">The useEncryption flag for the messages to send.</param>
		/// <param name="transactionType">The <see cref="MessageQueueTransactionType"/> for the message to send.</param>
		/// <param name="msmqInterfaceFactory">The factory to create the msmq interfaces.</param>
		public MsmqTraceListener(string name, string queuePath, ILogFormatter formater,
								 MessagePriority messagePriority, bool recoverable,
								 TimeSpan timeToReachQueue, TimeSpan timeToBeReceived,
								 bool useAuthentication, bool useDeadLetterQueue, bool useEncryption,
								 MessageQueueTransactionType transactionType,
								 IMsmqSendInterfaceFactory msmqInterfaceFactory)
			: base(formater)
		{
			this.queuePath = queuePath;
			this.messagePriority = messagePriority;
			this.recoverable = recoverable;
			this.timeToReachQueue = timeToReachQueue;
			this.timeToBeReceived = timeToBeReceived;
			this.useAuthentication = useAuthentication;
			this.useDeadLetterQueue = useDeadLetterQueue;
			this.useEncryption = useEncryption;
			this.transactionType = transactionType;
			this.msmqInterfaceFactory = msmqInterfaceFactory;
		}
开发者ID:wuyingyou,项目名称:uniframework,代码行数:34,代码来源:MsmqTraceListener.cs

示例7: MsmqTraceListenerData

 /// <summary>
 /// Initializes a new instance of the <see cref="MsmqTraceListenerData"/> class.
 /// </summary>
 /// <param name="name">The name for the represented trace listener.</param>
 /// <param name="queuePath">The path name for the represented trace listener.</param>
 /// <param name="formatterName">The formatter name for the represented trace listener.</param>
 /// <param name="messagePriority">The priority for the represented trace listener.</param>
 /// <param name="recoverable">The recoverable flag for the represented trace listener.</param>
 /// <param name="timeToReachQueue">The timeToReachQueue for the represented trace listener.</param>
 /// <param name="timeToBeReceived">The timeToReachQueue for the represented trace listener.</param>
 /// <param name="useAuthentication">The use authentication flag for the represented trace listener.</param>
 /// <param name="useDeadLetterQueue">The use dead letter flag for the represented trace listener.</param>
 /// <param name="useEncryption">The use encryption flag for the represented trace listener.</param>
 /// <param name="transactionType">The transaction type for the represented trace listener.</param>
 public MsmqTraceListenerData(string name, string queuePath, string formatterName,
                              MessagePriority messagePriority, bool recoverable,
                              TimeSpan timeToReachQueue, TimeSpan timeToBeReceived,
                              bool useAuthentication, bool useDeadLetterQueue, bool useEncryption,
                              MessageQueueTransactionType transactionType)
     : this(name, queuePath, formatterName, messagePriority, recoverable, timeToReachQueue, timeToBeReceived,
                              useAuthentication, useDeadLetterQueue, useEncryption, transactionType, TraceOptions.None, SourceLevels.All)
 {
 }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:23,代码来源:MsmqTraceListenerData.cs

示例8: Send

		public void Send (object obj, string label, MessageQueueTransactionType transactionType)
		{
			if (typeof (Message) == obj.GetType ()) {
				Message m = (Message) obj;
				m.Label = label;
				Send (m, transactionType);
			} else {
				Message m = new Message (obj);
				Send (m, label, transactionType);
			}
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:MessageQueue.cs

示例9: Send

 public void Send(Message message, MessageQueueTransactionType transactionType)
 {
     this.message = message;
     this.transactionType = transactionType;
     numMessages++;
 }
开发者ID:bnantz,项目名称:NCS-V2-0,代码行数:6,代码来源:MsmqTraceListenerFixture.cs

示例10: Send

	public void Send(object obj, MessageQueueTransactionType transactionType) {}
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:1,代码来源:MessageQueue.cs

示例11: ReceiveByCorrelationId

	public Message ReceiveByCorrelationId(string correlationId, System.TimeSpan timeout, MessageQueueTransactionType transactionType) {}
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:1,代码来源:MessageQueue.cs

示例12: ReceiveById

	public Message ReceiveById(string id, System.TimeSpan timeout, MessageQueueTransactionType transactionType) {}
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:1,代码来源:MessageQueue.cs

示例13: Run

		private IMessage Run (MessageQueueTransactionType transactionType,
		                      RecieveDelegate r)
		{
			switch (transactionType) {
			case MessageQueueTransactionType.Single:
				using (RabbitMQMessageQueueTransaction tx = GetTx ()) {
					bool success = false;
					try {
						IMessage msg = Run (tx, r);
						tx.Commit ();
						success = true;
						return msg;
					} finally {
						if (!success)
							tx.Abort ();
					}
				}

			case MessageQueueTransactionType.None:
				return Run (r);

			default:
				throw new NotSupportedException(transactionType + " not supported");
			}
		}		
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:25,代码来源:RabbitMQMessageQueue.cs

示例14: ReceiveByCorrelationId

		public IMessage ReceiveByCorrelationId (string id, TimeSpan timeout,
		                                        MessageQueueTransactionType transactionType)
		{
			return Run (transactionType, Receiver (timeout, ByCorrelationId (id)));
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:5,代码来源:RabbitMQMessageQueue.cs

示例15: Receive

	public Message Receive(System.TimeSpan timeout, Cursor cursor, MessageQueueTransactionType transactionType) {}
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:1,代码来源:MessageQueue.cs


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