コード例 #1
0
        public async Task <string> IntiateIncidentNotifications(IncidentForCreate incidentForCreate)
        {
            var mirSoapBody = MapperIncidentResponse.MapToIncidentCreateRequest(_incidentResponseServiceConnectionInfo.Username, _incidentResponseServiceConnectionInfo.Password, incidentForCreate);
            var intiateIncidentXmlResponse = await _serviceAgentHttp.PostAsync(string.Empty, mirSoapBody, "text/xml", IncidentResponseExceptionTranslator.EnsureSuccess);

            return(MapperIncidentResponse.MapCreateIncidentResponseToIncidentNumber(intiateIncidentXmlResponse));
        }
コード例 #2
0
        private static async Task CreateIncidentResponse()
        {
            var incidentResponseServiceConnectionInfo = new IncidentResponseServiceConnectionInfo("skumar", "youtube", "https://localhost:44373/api/incidentresponse/");
            var incidentForCreate = new IncidentForCreate(
                "This is the subject of the Email",
                "This is the description of the emails that will be sent",
                "https://matlus.webex.com/meet/test",
                "800-888-0000",
                "808 123 456",
                "Internal Ticket#: 123456789",
                "TechSupportGroup");

            using var incidentResponseGateway = new IncidentResponseGateway(incidentResponseServiceConnectionInfo);
            var incidentNumber = await incidentResponseGateway.IntiateIncidentNotifications(incidentForCreate);

            Console.WriteLine("Incident Response Created");
            Console.WriteLine($"Incident #: {incidentNumber}");
        }