IMessage.cs :  » Workflows » NServiceBus » NServiceBus » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Workflows » NServiceBus 
NServiceBus » NServiceBus » IMessage.cs
using System;

namespace NServiceBus{
  /// <summary>
  /// Marker interface to indicate that a class is a message suitable
  /// for transmission and handling by an NServiceBus.
  /// </summary>
    public interface IMessage
    {
    }

  /// <summary>
  /// Attribute to indicate that a message is recoverable.
  /// </summary>
  /// <remarks>
  /// This attribute should be applied to classes that implement <see cref="IMessage"/>
  /// to indicate that they should be treated as a recoverable message.  A recoverable 
  /// message is stored locally at every step along the route so that in the event of
  /// a failure of a machine along the route a copy of the message will be recovered and
  /// delivery will continue when the machine is brought back online.</remarks>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
    public class RecoverableAttribute : Attribute
    {
    }

  /// <summary>
  /// Attribute to indicate that a message has a period of time 
  /// in which to be received.
  /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
    public class TimeToBeReceivedAttribute : Attribute
    {
        /// <summary>
        /// Sets the time to be received to be unlimited.
        /// </summary>
        public TimeToBeReceivedAttribute() { }

    /// <summary>
    /// Sets the time to be received.
    /// </summary>
    /// <param name="timeSpan">A timespan that can be interpreted by <see cref="TimeSpan.Parse"/>.</param>
        public TimeToBeReceivedAttribute(string timeSpan)
        {
            this.timeToBeReceived = TimeSpan.Parse(timeSpan);
        }

        private readonly TimeSpan timeToBeReceived = TimeSpan.MaxValue;

    /// <summary>
    /// Gets the maximum time in which a message must be received.
    /// </summary>
    /// <remarks>
    /// If the interval specified by the TimeToBeReceived property expires before the message 
    /// is received by the destination of the message the message will automatically be cancelled.
    /// </remarks>
        public TimeSpan TimeToBeReceived
        {
            get { return timeToBeReceived; }
        }
    }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.