Class Case<T>
Class Case with returning result.
Implements
Inherited Members
Namespace: Akka
Assembly: Akka.dll
Syntax
public class Case<T> : IMatchResult
Type Parameters
Name | Description |
---|---|
T | The type of return value |
Constructors
| Improve this Doc View SourceCase(Object)
Initializes a new instance of the Case class.
Declaration
public Case(object message)
Parameters
Type | Name | Description |
---|---|---|
Object | message | The message. |
Properties
| Improve this Doc View SourceWasHandled
Gets a value indicating whether [was handled].
Declaration
public bool WasHandled { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Methods
| Improve this Doc View SourceResultOrDefault(Func<Object, T>)
Defaults the specified action.
Declaration
public T ResultOrDefault(Func<object, T> function)
Parameters
Type | Name | Description |
---|---|---|
Func<Object, T> | function | The default function. |
Returns
Type | Description |
---|---|
T | The result of the matching |
With<TMessage>(Func<TMessage, T>)
Withes the specified action.
Declaration
public Case<T> With<TMessage>(Func<TMessage, T> function)
Parameters
Type | Name | Description |
---|---|---|
Func<TMessage, T> | function | The action. |
Returns
Type | Description |
---|---|
Case<T> | Case. |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the t message. |
With<TMessage>(Func<T>)
Withes the specified action.
Declaration
public Case<T> With<TMessage>(Func<T> function)
Parameters
Type | Name | Description |
---|---|---|
Func<T> | function | The function. |
Returns
Type | Description |
---|---|
Case<T> | Case. |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the t message. |