OneComputeWpfClient\Services\OneComputeServices.cs
using DNV.One.Compute.Core.FlowModel;
using DNV.One.Compute.Core.JobStatus;
using DNV.One.Compute.StorageLibrary.Azure.Factory;
using OneComputeWpfClient.Azure;
namespace OneComputeWpfClient.Services
{
/// <summary>
/// OneCompute services.
/// </summary>
public class OneComputeServices
{
/// <summary>
/// Initializes a new instance of the <see cref="OneComputeServices"/> class.
/// </summary>
public OneComputeServices()
{
var storageServiceFactory = new AzureTableStorageServiceFactory();
JobStatusService = storageServiceFactory.CreateJobStatusService(AzureStorageConstants.StorageConnectionString);
WorkItemStatusService = storageServiceFactory.CreateWorkItemStatusService(AzureStorageConstants.StorageConnectionString);
WorkItemStorageService = storageServiceFactory.CreateWorkItemStorageService(AzureStorageConstants.StorageConnectionString);
ResultStorageService = storageServiceFactory.CreateResultStorageService(AzureStorageConstants.StorageConnectionString);
}
/// <summary>
/// Gets the job status service.
/// </summary>
public IJobStatusService JobStatusService { get; }
/// <summary>
/// Gets the work item status service.
/// </summary>
public IWorkItemStatusService WorkItemStatusService { get; }
/// <summary>
/// Gets the work item storage service.
/// </summary>
public IFlowModelStorageService<WorkItem> WorkItemStorageService { get; }
/// <summary>
/// Gets the result storage service.
/// </summary>
public IFlowModelStorageService<Result> ResultStorageService { get; }
}
}