Interface IRejectReason
- Namespace
- Concordium.Sdk.Types
- Assembly
- Concordium.Sdk.dll
Common interface for reject reasons. The user can with a switch statement determine the type and act on it. See example.
public interface IRejectReason
Examples
internal static void Example(IRejectReason rejectReason)
{
switch (rejectReason)
{a
case AlreadyABaker alreadyABaker:
Console.WriteLine($"Do this when already a baker with id: {alreadyABaker.BakerId}");
break;
case AlreadyADelegator alreadyADelegator:
Console.WriteLine($"Or do this when already a delegator");
break;
...
}
}