OperationBase Constructor
OperationBase(IYubiKeyConnection, IOtpSession, Nullable<Slot>)
Constructs as OperationBase<T> instance.
protected OperationBase(IYubiKeyConnection yubiKey, IOtpSession session, Nullable<Slot> slot = null)
Parameters
Type | Name | Description |
---|---|---|
IYubiKeyConnection | yubiKey | The connection to the YubiKey session. |
IOtpSession | session | Reference to IOtpSession instance. |
System.Nullable<Slot> | slot | Optional parameter specifying the slot to configure. Important: Inheriting classes that configure an OTP slot must supply this. |
Remarks
This generic abstract class is meant to be inherited from by a class that specifies itself as the templated type. This is so that this base class can allow the child class to call methods to configure settings in OtpSettings<T> and get back a reference to the calling class. This allows us to use method-chaining to implement the fluent builder pattern.
Most, but not all, classes that inherit from OperationBase<T> will be configuring an OTP slot. Those classes must call this constructor with a valid value. Classes that do not configure a slot should either not specify this parameter, or call it with null.