Table of Contents

Class RepoModelStore

Namespace
DCR.Workflow
Assembly
DCR.Workflow.dll
public class RepoModelStore : IModelStore
Inheritance
RepoModelStore
Implements
Inherited Members
Extension Methods

Constructors

RepoModelStore(ILogger<RepoModelStore>, IOptions<RepoModelStoreOptions>, HttpClient, Runtime)

public RepoModelStore(ILogger<RepoModelStore> logger, IOptions<RepoModelStoreOptions> options, HttpClient client, Runtime runtime)

Parameters

logger ILogger<RepoModelStore>
options IOptions<RepoModelStoreOptions>
client HttpClient
runtime Runtime

Properties

AuthenticationToken

public string AuthenticationToken { get; set; }

Property Value

string

IsConnected

public bool IsConnected { get; }

Property Value

bool

Methods

CreateAsync(Model)

public Task<int> CreateAsync(Model model)

Parameters

model Model

Returns

Task<int>

GetAllAsync(string?)

public Task<List<ModelDescriptor>> GetAllAsync(string? query = null)

Parameters

query string

Returns

Task<List<ModelDescriptor>>

GetAsync(int)

public Task<Model> GetAsync(int id)

Parameters

id int

Returns

Task<Model>

SendRequestWithAuthorizationAsync(HttpRequestMessage)

public Task<HttpResponseMessage> SendRequestWithAuthorizationAsync(HttpRequestMessage request)

Parameters

request HttpRequestMessage

Returns

Task<HttpResponseMessage>

TryConnectAsync(string, string)

public Task<bool> TryConnectAsync(string username, string password)

Parameters

username string
password string

Returns

Task<bool>

TryWriteAsync(Model)

Attempt to write model to persistent storage

public Task<Model?> TryWriteAsync(Model model)

Parameters

model Model

The model to write

Returns

Task<Model>

Null if the write succeeded, or a new model if the "model" we try to write was updated in the database since we retrieved it.

UpdateAsync(Model)

public Task UpdateAsync(Model model)

Parameters

model Model

Returns

Task

Url(string)

public Uri Url(string suffix)

Parameters

suffix string

Returns

Uri