Crescendo SDK
|
Represents the outcome of an operation, which can either be successful or a failure. More...
Static Public Member Functions | |
static Result< T > | Create< T > (T? value) |
Creates a new CrescendoDLL.SDKCore.Result<T> based on the provided value. If the value is not null, a successful CrescendoDLL.SDKCore.Result<T> is created; otherwise, a failed CrescendoDLL.SDKCore.Result<T> with a null value error is created. | |
static Result | Failure (Error error) |
Creates a new failed CrescendoDLL.SDKCore.Result with the specified error. | |
static Result< T > | Failure< T > (Error error) |
Creates a new failed CrescendoDLL.SDKCore.Result<T> with the specified error. | |
static implicit | operator Result< T > (T? value) |
Implicitly converts a nullable value of type T to a CrescendoDLL.SDKCore.Result<T>. If the value is not null, a successful CrescendoDLL.SDKCore.Result<T> is created; otherwise, a failed CrescendoDLL.SDKCore.Result<T> with a null value error is created. | |
static Result | Success () |
Creates a new successful CrescendoDLL.SDKCore.Result. | |
static Result< T > | Success< T > (T value) |
Creates a new successful CrescendoDLL.SDKCore.Result<T> with the specified value. | |
Protected Member Functions | |
Result (bool isSuccess, Error error) | |
Initializes a new instance of the CrescendoDLL.SDKCore.Result class. | |
Properties | |
Error | Error [get] |
Gets the error that occurred if the operation failed. | |
bool | IsFailure [get] |
Gets a value indicating whether the operation failed. | |
bool | IsSuccess [get] |
Gets a value indicating whether the operation was successful. | |
T | Value [get] |
Gets the value of the result if it is successful. | |
Represents the outcome of an operation, which can either be successful or a failure.
Represents the outcome of an operation with a value, which can either be successful or a failure.
T | The type of the value. |
|
inlineprotected |
Initializes a new instance of the CrescendoDLL.SDKCore.Result class.
isSuccess | Indicates whether the operation was successful. |
error | The error that occurred if the operation failed. |
InvalidOperationException | Thrown if isSuccess is true and error is not Error.None, or if isSuccess is false and error is Error.None. |
References CrescendoDLL.SDKCore.Result< T >.Error, and CrescendoDLL.SDKCore.Result< T >.IsSuccess.
Creates a new CrescendoDLL.SDKCore.Result<T> based on the provided value. If the value is not null, a successful CrescendoDLL.SDKCore.Result<T> is created; otherwise, a failed CrescendoDLL.SDKCore.Result<T> with a null value error is created.
T | The type of the value. |
value | The value. |
|
static |
Creates a new failed CrescendoDLL.SDKCore.Result with the specified error.
error | The error that occurred. |
Referenced by CrescendoDLL.SDKCore.AuthenticateWithXAUTH(), CrescendoDLL.SDKCore.AuthenticatorGetInfo(), CrescendoDLL.SDKCore.AuthenticatorGetNextAssertion(), CrescendoDLL.SDKCore.ChangePIN(), CrescendoDLL.SDKCore.ChangeXAUTHMode(), CrescendoDLL.SDKCore.ConfigureOATHSlot(), CrescendoDLL.SDKCore.ConfigureOCRASlot(), CrescendoDLL.SDKCore.ConfigureStaticPassword(), CrescendoDLL.SDKCore.DeleteOATHSlot(), CrescendoDLL.SDKCore.EncryptKEKAndDataWithKEK(), CrescendoDLL.SDKCore.FIDOChangePIN(), CrescendoDLL.SDKCore.FIDOConfig(), CrescendoDLL.SDKCore.FIDOCredentialManagement(), CrescendoDLL.SDKCore.FIDOGetAssertion(), CrescendoDLL.SDKCore.FIDOGetChallenge(), CrescendoDLL.SDKCore.FIDOListCredentials(), CrescendoDLL.SDKCore.FIDOMakeCredential(), CrescendoDLL.SDKCore.FIDOSetPIN(), CrescendoDLL.SDKCore.FIDOUnblockPIN(), CrescendoDLL.SDKCore.GenerateOTP(), CrescendoDLL.SDKCore.GetChallenge(), CrescendoDLL.SDKCore.GetSKITransportKey(), CrescendoDLL.SDKCore.GetTokenCUID(), CrescendoDLL.SDKCore.ListFIDOProperties(), CrescendoDLL.SDKCore.ListOATHProperties(), CrescendoDLL.SDKCore.NewToken(), CrescendoDLL.SDKCore.OCRAAuthenticate(), CrescendoDLL.SDKCore.PIVAddDataToDataObject(), CrescendoDLL.SDKCore.PIVChangeDataObjectACR(), CrescendoDLL.SDKCore.PIVChangePKISlotACR(), CrescendoDLL.SDKCore.PIVDeleteCertificate(), CrescendoDLL.SDKCore.PIVDeleteDataFromDataObject(), CrescendoDLL.SDKCore.PIVDeleteKey(), CrescendoDLL.SDKCore.PIVGenerateKeyPair(), CrescendoDLL.SDKCore.PIVGetCertificate(), CrescendoDLL.SDKCore.PIVGetDataObjectContent(), CrescendoDLL.SDKCore.PIVGetPersonalInfo(), CrescendoDLL.SDKCore.PIVPutPKIData(), CrescendoDLL.SDKCore.PIVRawCryptoOperation(), CrescendoDLL.SDKCore.PIVSignData(), CrescendoDLL.SDKCore.PUKPut(), CrescendoDLL.SDKCore.PutXAUTHKey(), CrescendoDLL.SDKCore.ReadCacheFreshness(), CrescendoDLL.SDKCore.ResetPINTries(), and CrescendoDLL.SDKCore.UpdatePINProperties().
Creates a new failed CrescendoDLL.SDKCore.Result<T> with the specified error.
T | The type of the value. |
error | The error that occurred. |
Implicitly converts a nullable value of type T to a CrescendoDLL.SDKCore.Result<T>. If the value is not null, a successful CrescendoDLL.SDKCore.Result<T> is created; otherwise, a failed CrescendoDLL.SDKCore.Result<T> with a null value error is created.
value | The value to convert. |
|
static |
Creates a new successful CrescendoDLL.SDKCore.Result.
Referenced by CrescendoDLL.SDKCore.ChangePIN(), CrescendoDLL.SDKCore.ChangeXAUTHMode(), CrescendoDLL.SDKCore.ConfigureOATHSlot(), CrescendoDLL.SDKCore.ConfigureOCRASlot(), CrescendoDLL.SDKCore.ConfigureStaticPassword(), CrescendoDLL.SDKCore.DeleteOATHSlot(), CrescendoDLL.SDKCore.DeleteXAUTHKey(), CrescendoDLL.SDKCore.EncryptKEKAndDataWithKEK(), CrescendoDLL.SDKCore.FIDOChangePIN(), CrescendoDLL.SDKCore.FIDOGetChallenge(), CrescendoDLL.SDKCore.FIDOListCredentials(), CrescendoDLL.SDKCore.FIDOSetPIN(), CrescendoDLL.SDKCore.GenerateOTP(), CrescendoDLL.SDKCore.GetChallenge(), CrescendoDLL.SDKCore.GetTokenCUID(), CrescendoDLL.SDKCore.ListACAProperties(), CrescendoDLL.SDKCore.ListFIDOProperties(), CrescendoDLL.SDKCore.ListOATHProperties(), CrescendoDLL.SDKCore.ListPIVProperties(), CrescendoDLL.SDKCore.Logout(), CrescendoDLL.SDKCore.NewToken(), CrescendoDLL.SDKCore.OCRAAuthenticate(), CrescendoDLL.SDKCore.PIVAddDataToDataObject(), CrescendoDLL.SDKCore.PIVChangeDataObjectACR(), CrescendoDLL.SDKCore.PIVChangePKISlotACR(), CrescendoDLL.SDKCore.PIVDeleteCertificate(), CrescendoDLL.SDKCore.PIVDeleteDataFromDataObject(), CrescendoDLL.SDKCore.PIVDeleteKey(), CrescendoDLL.SDKCore.PIVGenerateKeyPair(), CrescendoDLL.SDKCore.PIVGetCertificate(), CrescendoDLL.SDKCore.PIVGetDataObjectContent(), CrescendoDLL.SDKCore.PIVGetPersonalInfo(), CrescendoDLL.SDKCore.PIVPutPKIData(), CrescendoDLL.SDKCore.PIVRawCryptoOperation(), CrescendoDLL.SDKCore.PIVSignData(), CrescendoDLL.SDKCore.PUKPut(), CrescendoDLL.SDKCore.ReadCacheFreshness(), CrescendoDLL.SDKCore.ResetPINTries(), CrescendoDLL.SDKCore.ResetToken(), and CrescendoDLL.SDKCore.UpdatePINProperties().
Creates a new successful CrescendoDLL.SDKCore.Result<T> with the specified value.
T | The type of the value. |
value | The value. |
|
get |
Gets the error that occurred if the operation failed.
Referenced by CrescendoDLL.SDKCore.AuthenticatorGetInfo(), CrescendoDLL.SDKCore.AuthenticatorGetNextAssertion(), CrescendoDLL.SDKCore.ChangePIN(), CrescendoDLL.SDKCore.ConfigureOATHSlot(), CrescendoDLL.SDKCore.ConfigureOCRASlot(), CrescendoDLL.SDKCore.ConfigureStaticPassword(), CrescendoDLL.SDKCore.DeleteOATHSlot(), CrescendoDLL.SDKCore.FIDOChangePIN(), CrescendoDLL.SDKCore.FIDOConfig(), CrescendoDLL.SDKCore.FIDOCredentialManagement(), CrescendoDLL.SDKCore.FIDOGetAssertion(), CrescendoDLL.SDKCore.FIDOGetChallenge(), CrescendoDLL.SDKCore.FIDOListCredentials(), CrescendoDLL.SDKCore.FIDOMakeCredential(), CrescendoDLL.SDKCore.FIDOSetPIN(), CrescendoDLL.SDKCore.GenerateOTP(), CrescendoDLL.SDKCore.GetChallenge(), CrescendoDLL.SDKCore.GetSKITransportKey(), CrescendoDLL.SDKCore.ListFIDOProperties(), CrescendoDLL.SDKCore.NewToken(), CrescendoDLL.SDKCore.OCRAAuthenticate(), CrescendoDLL.SDKCore.PIVAddDataToDataObject(), CrescendoDLL.SDKCore.PIVChangeDataObjectACR(), CrescendoDLL.SDKCore.PIVChangePKISlotACR(), CrescendoDLL.SDKCore.PIVDeleteCertificate(), CrescendoDLL.SDKCore.PIVDeleteDataFromDataObject(), CrescendoDLL.SDKCore.PIVDeleteKey(), CrescendoDLL.SDKCore.PIVGenerateKeyPair(), CrescendoDLL.SDKCore.PIVGetCertificate(), CrescendoDLL.SDKCore.PIVGetDataObjectContent(), CrescendoDLL.SDKCore.PIVGetPersonalInfo(), CrescendoDLL.SDKCore.PIVPutPKIData(), CrescendoDLL.SDKCore.PIVRawCryptoOperation(), CrescendoDLL.SDKCore.PIVSignData(), CrescendoDLL.SDKCore.PUKPut(), CrescendoDLL.SDKCore.PutXAUTHKey(), CrescendoDLL.SDKCore.ReadCacheFreshness(), CrescendoDLL.SDKCore.Result< T >.Result(), and CrescendoDLL.SDKCore.UpdatePINProperties().
|
get |
Gets a value indicating whether the operation failed.
Referenced by CrescendoDLL.SDKCore.AuthenticateWithXAUTH(), CrescendoDLL.SDKCore.AuthenticatorClientPIN(), CrescendoDLL.SDKCore.AuthenticatorConfig(), CrescendoDLL.SDKCore.AuthenticatorCredentialManagement(), CrescendoDLL.SDKCore.AuthenticatorGetAssertion(), CrescendoDLL.SDKCore.AuthenticatorGetInfo(), CrescendoDLL.SDKCore.AuthenticatorGetNextAssertion(), CrescendoDLL.SDKCore.AuthenticatorMakeCredential(), CrescendoDLL.SDKCore.AuthenticatorReset(), CrescendoDLL.SDKCore.ChangePIN(), CrescendoDLL.SDKCore.ChangeXAUTHMode(), CrescendoDLL.SDKCore.ConfigureOATHSlot(), CrescendoDLL.SDKCore.ConfigureOCRASlot(), CrescendoDLL.SDKCore.ConfigureStaticPassword(), CrescendoDLL.SDKCore.DeleteOATHSlot(), CrescendoDLL.SDKCore.DeleteXAUTHKey(), CrescendoDLL.SDKCore.FIDOChangePIN(), CrescendoDLL.SDKCore.FIDOConfig(), CrescendoDLL.SDKCore.FIDOCredentialManagement(), CrescendoDLL.SDKCore.FIDOGetAssertion(), CrescendoDLL.SDKCore.FIDOGetChallenge(), CrescendoDLL.SDKCore.FIDOListCredentials(), CrescendoDLL.SDKCore.FIDOMakeCredential(), CrescendoDLL.SDKCore.FIDOSetPIN(), CrescendoDLL.SDKCore.GenerateOTP(), CrescendoDLL.SDKCore.GetChallenge(), CrescendoDLL.SDKCore.GetSKITransportKey(), CrescendoDLL.SDKCore.ListFIDOProperties(), CrescendoDLL.SDKCore.Logout(), CrescendoDLL.SDKCore.NewToken(), CrescendoDLL.SDKCore.OCRAAuthenticate(), CrescendoDLL.SDKCore.PIVAddDataToDataObject(), CrescendoDLL.SDKCore.PIVChangeDataObjectACR(), CrescendoDLL.SDKCore.PIVChangePKISlotACR(), CrescendoDLL.SDKCore.PIVDeleteCertificate(), CrescendoDLL.SDKCore.PIVDeleteDataFromDataObject(), CrescendoDLL.SDKCore.PIVDeleteKey(), CrescendoDLL.SDKCore.PIVGenerateKeyPair(), CrescendoDLL.SDKCore.PIVGetCertificate(), CrescendoDLL.SDKCore.PIVGetDataObjectContent(), CrescendoDLL.SDKCore.PIVGetPersonalInfo(), CrescendoDLL.SDKCore.PIVPutPKIData(), CrescendoDLL.SDKCore.PIVRawCryptoOperation(), CrescendoDLL.SDKCore.PIVSignData(), CrescendoDLL.SDKCore.PUKPut(), CrescendoDLL.SDKCore.PutXAUTHKey(), CrescendoDLL.SDKCore.ReadCacheFreshness(), CrescendoDLL.SDKCore.ResetPINTries(), CrescendoDLL.SDKCore.ResetToken(), CrescendoDLL.SDKCore.U2FAuthentication(), CrescendoDLL.SDKCore.U2FGetVersion(), CrescendoDLL.SDKCore.U2FRegistration(), and CrescendoDLL.SDKCore.UpdatePINProperties().
|
get |
Gets a value indicating whether the operation was successful.
Referenced by CrescendoDLL.SDKCore.FIDOListCredentials(), CrescendoDLL.SDKCore.ListFIDOProperties(), and CrescendoDLL.SDKCore.Result< T >.Result().
|
get |
Gets the value of the result if it is successful.
InvalidOperationException | Thrown if the result is not successful. |
Referenced by CrescendoDLL.SDKCore.AuthenticateWithXAUTH(), CrescendoDLL.SDKCore.AuthenticatorGetInfo(), CrescendoDLL.SDKCore.ConfigureOATHSlot(), CrescendoDLL.SDKCore.ConfigureOCRASlot(), CrescendoDLL.SDKCore.ConfigureStaticPassword(), CrescendoDLL.SDKCore.FIDOChangePIN(), CrescendoDLL.SDKCore.FIDOConfig(), CrescendoDLL.SDKCore.FIDOCredentialManagement(), CrescendoDLL.SDKCore.FIDOGetAssertion(), CrescendoDLL.SDKCore.FIDOGetChallenge(), CrescendoDLL.SDKCore.FIDOListCredentials(), CrescendoDLL.SDKCore.FIDOMakeCredential(), CrescendoDLL.SDKCore.FIDOSetPIN(), CrescendoDLL.SDKCore.FIDOUnblockPIN(), CrescendoDLL.SDKCore.GenerateOTP(), CrescendoDLL.SDKCore.GetAllAvailableTokens(), CrescendoDLL.SDKCore.GetChallenge(), CrescendoDLL.SDKCore.ListFIDOProperties(), CrescendoDLL.SDKCore.NewToken(), CrescendoDLL.SDKCore.OCRAAuthenticate(), CrescendoDLL.SDKCore.PIVAddDataToDataObject(), CrescendoDLL.SDKCore.PIVChangeDataObjectACR(), CrescendoDLL.SDKCore.PIVChangePKISlotACR(), CrescendoDLL.SDKCore.PIVDeleteCertificate(), CrescendoDLL.SDKCore.PIVDeleteDataFromDataObject(), CrescendoDLL.SDKCore.PIVDeleteKey(), CrescendoDLL.SDKCore.PIVGenerateKeyPair(), CrescendoDLL.SDKCore.PIVGetCertificate(), CrescendoDLL.SDKCore.PIVGetDataObjectContent(), CrescendoDLL.SDKCore.PIVGetPersonalInfo(), CrescendoDLL.SDKCore.PIVPutPKIData(), CrescendoDLL.SDKCore.PIVRawCryptoOperation(), CrescendoDLL.SDKCore.PIVSignData(), CrescendoDLL.SDKCore.PutXAUTHKey(), and CrescendoDLL.SDKCore.ReadCacheFreshness().