Class ExceptionDescriptorAttribute
Provides information about an System.Exception, in a developer friendly way, optimized for open- and otherwise public application programming interfaces (API).
Inheritance
Implements
Inherited Members
Namespace: Cuemon.Diagnostics
Assembly: Cuemon.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class ExceptionDescriptorAttribute : Attribute, IMessageLocalizer
Constructors
| Improve this DocExceptionDescriptorAttribute(Type)
Initializes a new instance of the ExceptionDescriptorAttribute class.
Declaration
public ExceptionDescriptorAttribute(Type failureType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | failureType | The System.Type of the failure to match and describe. |
Properties
| Improve this DocCode
Gets or sets an error code that uniquely identifies the type of failure.
Declaration
public string Code { get; set; }
Property Value
Type | Description |
---|---|
System.String | The number that identifies the type of failure. |
FailureType
Gets the System.Type of System.Exception to match and describe.
Declaration
public Type FailureType { get; }
Property Value
Type | Description |
---|---|
System.Type | The System.Type of System.Exception to match. |
HelpLink
Gets or sets a link to the help page associated with this failure.
Declaration
public string HelpLink { get; set; }
Property Value
Type | Description |
---|---|
System.String | The location of an optional help page associated with this failure. |
Message
Gets or sets a default message that describes the current failure.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default message that explains the reason for the failure. |
MessageResourceName
Gets or sets the resource name (property name) to use as the key for lookups on the resource type.
Declaration
public string MessageResourceName { get; set; }
Property Value
Type | Description |
---|---|
System.String | Use this property to set the name of the property within MessageResourceType that will provide a localized message that describes the current failure. |
MessageResourceType
Gets or sets the resource type to use for message lookups.
Declaration
public Type MessageResourceType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | Use this property only in conjunction with MessageResourceName. They are used together to retrieve localized messages at runtime. |