Example #1
0
        public virtual Response <GenerateExpressRoutePortsLOAResult> GenerateLOA(GenerateExpressRoutePortsLOARequest request, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(request, nameof(request));

            using var scope = _expressRoutePortClientDiagnostics.CreateScope("ExpressRoutePort.GenerateLOA");
            scope.Start();
            try
            {
                var response = _expressRoutePortRestClient.GenerateLOA(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, request, cancellationToken);
                return(response);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
Example #2
0
        public virtual Response <GenerateExpressRoutePortsLOAResult> GenerateLOA(GenerateExpressRoutePortsLOARequest request, CancellationToken cancellationToken = default)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            using var scope = _clientDiagnostics.CreateScope("ExpressRoutePort.GenerateLOA");
            scope.Start();
            try
            {
                var response = _restClient.GenerateLOA(Id.ResourceGroupName, Id.Name, request, cancellationToken);
                return(response);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }