Xecrets.Sdk.XfApiFactory.md
June 29, 2026 · View on GitHub
Xecrets.Sdk
Xecrets.Sdk
XfApiFactory Class
Create an IXfApi instance.
public class XfApiFactory : Xecrets.Sdk.Abstractions.IXfApiFactory
Inheritance System.Object → XfApiFactory
Implements IXfApiFactory
Constructors
XfApiFactory(string, Func, string, string, IScheduler, IScheduler) Constructor
Create an IXfApi instance.
public XfApiFactory(string license, System.Func<bool> debugCli, string workFolder, string crashLogName, System.Reactive.Concurrency.IScheduler taskpoolScheduler, System.Reactive.Concurrency.IScheduler mainthreadScheduler);
Parameters
license System.String
A Xecrets license string to provide for a ready built version of XecretsCli.
debugCli System.Func<System.Boolean>
Set to true to cause the command line to stop on a breakpoint and enable attaching a debugger. (Windows only)
workFolder System.String
A folder where the command line can write logs and settings.
crashLogName System.String
The file name where command line can write a crash log on non-zero return status.
taskpoolScheduler System.Reactive.Concurrency.IScheduler
An System.Reactive.Concurrency.IScheduler instance to schedule work on the taskpool.
mainthreadScheduler System.Reactive.Concurrency.IScheduler
An System.Reactive.Concurrency.IScheduler instance to schedule work on the main (GUI) thread.
Methods
XfApiFactory.Create(Nullable, CancellationToken) Method
Create an IXfApi instance with an optional cli debugging override.
public Xecrets.Sdk.Abstractions.IXfApi Create(System.Nullable<bool> debugOverride, System.Threading.CancellationToken ct);
Parameters
debugOverride System.Nullable<System.Boolean>
Override the global debug cli flag if non-null.
ct System.Threading.CancellationToken
A cancellation token to cancel any long running operation.
Implements Create(Nullable<bool>, CancellationToken)
Returns
XfApiFactory.Safe() Method
Create an IXfApi instance with safe defaults.
public static Xecrets.Sdk.Abstractions.IXfApi Safe();
Returns
IXfApi
An instance of IXfApi ready to use.
Remarks
Should normally not be used when using Axantum ready built command line tool binaries, as no license is provided. Another option to provide the license is to place it in a text file next to the executable.
XfApiFactory.Start() Method
Create an IXfStart instance providing startup information for the application.
public static Xecrets.Sdk.Abstractions.IXfStart Start();
Returns
IXfStart
An IStart instance.