ExceptionClassAttribute-Klasse
Legt die Warteschlangenausnahmeklasse für die in einer Warteschlange befindliche Klasse fest. Diese Klasse kann nicht vererbt werden.
Namespace: System.EnterpriseServices
Assembly: System.EnterpriseServices (in system.enterpriseservices.dll)
Syntax
'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, Inherited:=True)> _
<ComVisibleAttribute(False)> _
Public NotInheritable Class ExceptionClassAttribute
Inherits Attribute
'Usage
Dim instance As ExceptionClassAttribute
[AttributeUsageAttribute(AttributeTargets.Class, Inherited=true)]
[ComVisibleAttribute(false)]
public sealed class ExceptionClassAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, Inherited=true)]
[ComVisibleAttribute(false)]
public ref class ExceptionClassAttribute sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class, Inherited=true) */
/** @attribute ComVisibleAttribute(false) */
public final class ExceptionClassAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class, Inherited=true)
ComVisibleAttribute(false)
public final class ExceptionClassAttribute extends Attribute
Hinweise
Weitere Informationen über das Verwenden von Attributen finden Sie unter Erweitern von Metadaten mithilfe von Attributen.
Beispiel
Im folgenden Codebeispiel wird die Verwendung des ExceptionClassAttribute-Typs veranschaulicht.
using System;
using System.EnterpriseServices;
using System.Reflection;
// References:
// System.EnterpriseServices
[ExceptionClass("ExceptionHandler")]
public class ExceptionClassAttribute_Ctor_String : ServicedComponent
{
}
[ExceptionClass("ExceptionHandler")]
public class ExceptionClassAttribute_Value : ServicedComponent
{
public void ValueExample()
{
// Get the ExceptionClassAttribute applied to the class.
ExceptionClassAttribute attribute =
(ExceptionClassAttribute)Attribute.GetCustomAttribute(
this.GetType(),
typeof(ExceptionClassAttribute),
false);
// Display the value of the attribute's Value property.
Console.WriteLine("ExceptionClassAttribute.Value: {0}",
attribute.Value);
}
}
import System.*;
import System.EnterpriseServices.*;
import System.Reflection.*;
// References:
// System.EnterpriseServices
/** @attribute ExceptionClass("ExceptionHandler")
*/
public class ExceptionClassAttribute_Ctor_String extends ServicedComponent
{
} //ExceptionClassAttribute_Ctor_String
/** @attribute ExceptionClass("ExceptionHandler")
*/
public class ExceptionClassAttribute_Value extends ServicedComponent
{
public void ValueExample()
{
// Get the ExceptionClassAttribute applied to the class.
ExceptionClassAttribute attribute = (ExceptionClassAttribute)(
Attribute.GetCustomAttribute(this.GetType(),
ExceptionClassAttribute.class.ToType(), false));
// Display the value of the attribute's Value property.
Console.WriteLine("ExceptionClassAttribute.Value: {0}",
attribute.get_Value());
} //ValueExample
} //ExceptionClassAttribute_Value
Vererbungshierarchie
System.Object
System.Attribute
System.EnterpriseServices.ExceptionClassAttribute
Threadsicherheit
Alle öffentlichen statischen (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.
Plattformen
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
ExceptionClassAttribute-Member
System.EnterpriseServices-Namespace