private static async Task CreateWorkOrder()
        {
            var workOrderForCreate       = new WorkOrderForCreate("Title", "This is the Description", DateTime.Now, "*****@*****.**");
            var workOrderServiceSettings = new WorkOrderServiceConnectionInfo("skumar", "youtube", "https://localhost:44373/api/workorder/");

            using var workOrderGateway = new WorkOrderServiceGatewayV2(workOrderServiceSettings);
            var workOrderId = await workOrderGateway.CreateWorkOrder(workOrderForCreate).ConfigureAwait(false);

            Console.WriteLine("Fixed Version");
            Console.WriteLine($"Work Order Id: {workOrderId}");
        }
示例#2
0
 public WorkOrderServiceGateway(WorkOrderServiceConnectionInfo workOrderServiceSettings)
 {
     _workOrderServiceSettings = workOrderServiceSettings;
     _httpClient = CreateHttpClient(_workOrderServiceSettings.BaseUrl);
 }
 public WorkOrderServiceGatewayV2(WorkOrderServiceConnectionInfo workOrderServiceSettings)
 {
     _workOrderServiceSettings = workOrderServiceSettings;
     _serviceAgentHttp         = new ServiceAgentHttp(_workOrderServiceSettings.BaseUrl);
 }