Class MessageService
Provides implementation for IMessenger service
Inheritance
System.Object
Service<System.Object>
ServiceWithInstrumentationBase<System.Object>
MessageService
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Web.Messaging
Assembly: NFX.Web.dll
Syntax
public sealed class MessageService : ServiceWithInstrumentationBase<object>, ILocalizedTimeProvider, IInstrumentable, IExternallyParameterized, IMessengerImplementation, IMessenger, IApplicationComponent, IDisposable, IService, IConfigurable, IApplicationFinishNotifiable, INamed
Constructors
MessageService()
Constructs the service. For most-typical cases use MailerService.Instance instead
Declaration
public MessageService()
MessageService(Object)
Constructs the directed service instance
Declaration
public MessageService(object director)
Parameters
Type | Name | Description |
---|---|---|
System.Object | director |
Fields
CONFIG_FALLBACK_SINK_SECTION
Declaration
public const string CONFIG_FALLBACK_SINK_SECTION = "fallback-sink"
Field Value
Type | Description |
---|---|
System.String |
CONFIG_MESSAGING_SECTION
Declaration
public const string CONFIG_MESSAGING_SECTION = "messaging"
Field Value
Type | Description |
---|---|
System.String |
CONFIG_SINK_SECTION
Declaration
public const string CONFIG_SINK_SECTION = "sink"
Field Value
Type | Description |
---|---|
System.String |
Properties
FallbackSink
Declaration
public IMessageSink FallbackSink { get; set; }
Property Value
Type | Description |
---|---|
IMessageSink |
Instance
Returns a singleton instance of the default mailer
Declaration
public static IMessenger Instance { get; }
Property Value
Type | Description |
---|---|
IMessenger |
InstrumentationEnabled
Turns instrumentation on/off
Declaration
[Config(Default = false)]
[ExternalParameter(new string[]{"instrumentation", "messaging"})]
public override bool InstrumentationEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
NFX.ServiceModel.ServiceWithInstrumentationBase<System.Object>.InstrumentationEnabled
LogLevel
Declaration
[Config(Default = MessageType.Warning)]
[ExternalParameter(new string[]{"messaging"})]
public MessageType LogLevel { get; set; }
Property Value
Type | Description |
---|---|
MessageType |
Sink
Gets/sets sink that performs sending
Declaration
public IMessageSink Sink { get; set; }
Property Value
Type | Description |
---|---|
IMessageSink |
Methods
ApplicationFinishAfterCleanup(IApplication)
Declaration
public void ApplicationFinishAfterCleanup(IApplication application)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application |
ApplicationFinishBeforeCleanup(IApplication)
Declaration
public void ApplicationFinishBeforeCleanup(IApplication application)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application |
Destructor()
Declaration
protected override void Destructor()
Overrides
DoConfigure(IConfigSectionNode)
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Type | Name | Description |
---|---|---|
IConfigSectionNode | node |
Overrides
DoSignalStop()
Declaration
protected override void DoSignalStop()
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
DoWaitForCompleteStop()
Declaration
protected override void DoWaitForCompleteStop()
Overrides
SendMsg(Message)
Declaration
public void SendMsg(Message msg)
Parameters
Type | Name | Description |
---|---|---|
Message | msg |
Implements
System.IDisposable