Class CommandHandlerDescriptor
Describes a command handler.
Inheritance
System.Object
CommandHandlerDescriptor
Namespace: TehGM.Wolfringo.Commands.Initialization
Assembly: Wolfringo.Commands.dll
Syntax
public class CommandHandlerDescriptor : ICommandHandlerDescriptor, IEquatable<ICommandHandlerDescriptor>
Constructors
| Improve this Doc View SourceCommandHandlerDescriptor(ConstructorInfo, IEnumerable<Object>)
creates a command handler descriptor.
Declaration
public CommandHandlerDescriptor(ConstructorInfo ctor, IEnumerable<object> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ConstructorInfo | ctor | Constructor picked for creating the handler instance. |
System.Collections.Generic.IEnumerable<System.Object> | parameters | Dependencies resolved for constructor injection. |
Properties
| Improve this Doc View SourceAttribute
CommandHandler attribute the handler is decorated with.
Declaration
public CommandsHandlerAttribute Attribute { get; }
Property Value
Type | Description |
---|---|
CommandsHandlerAttribute |
Remarks
This value might be null if descriptor was force-loaded from a type that wasn't automatically discovered.
Constructor
Constructor picked for creating the handler instance.
Declaration
public ConstructorInfo Constructor { get; }
Property Value
Type | Description |
---|---|
System.Reflection.ConstructorInfo |
ConstructorParams
Dependencies resolved for constructor injection.
Declaration
public object[] ConstructorParams { get; }
Property Value
Type | Description |
---|---|
System.Object[] |
Type
Command handler type.
Declaration
public Type Type { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
| Improve this Doc View SourceCreateInstance()
Creates a new instance of a handler.
Declaration
public object CreateInstance()
Returns
Type | Description |
---|---|
System.Object | New handler instance. |
Remarks
This method will call Constructor, injecting all ConstructorParams.
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
Equals(ICommandHandlerDescriptor)
Declaration
public bool Equals(ICommandHandlerDescriptor other)
Parameters
Type | Name | Description |
---|---|---|
ICommandHandlerDescriptor | other |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
Operators
| Improve this Doc View SourceEquality(CommandHandlerDescriptor, CommandHandlerDescriptor)
Declaration
public static bool operator ==(CommandHandlerDescriptor left, CommandHandlerDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
CommandHandlerDescriptor | left | |
CommandHandlerDescriptor | right |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(CommandHandlerDescriptor, CommandHandlerDescriptor)
Declaration
public static bool operator !=(CommandHandlerDescriptor left, CommandHandlerDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
CommandHandlerDescriptor | left | |
CommandHandlerDescriptor | right |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IEquatable<T>