Class RepoModelStore
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
HttpClientruntime
Runtime
Properties
AuthenticationToken
public string AuthenticationToken { get; set; }
Property Value
IsConnected
public bool IsConnected { get; }
Property Value
Methods
CreateAsync(Model)
public Task<int> CreateAsync(Model model)
Parameters
model
Model
Returns
GetAllAsync(string?)
public Task<List<ModelDescriptor>> GetAllAsync(string? query = null)
Parameters
query
string
Returns
GetAsync(int)
public Task<Model> GetAsync(int id)
Parameters
id
int
Returns
GetAsync(int, int)
Get a specific version of a model
public Task<Model> GetAsync(int id, int version)
Parameters
Returns
SendRequestWithAuthorizationAsync(HttpRequestMessage)
public Task<HttpResponseMessage> SendRequestWithAuthorizationAsync(HttpRequestMessage request)
Parameters
request
HttpRequestMessage
Returns
TryConnectAsync(string, string)
public Task<bool> TryConnectAsync(string username, string password)
Parameters
Returns
TryWriteAsync(Model)
Attempt to write model to persistent storage
public Task<Model?> TryWriteAsync(Model model)
Parameters
model
ModelThe 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
Url(string)
public Uri Url(string suffix)
Parameters
suffix
string