Inheritance: System.EventArgs
        void AfterResponseEvents(object sender, ResponseEventArgs args)
        {
            var webArgs = args as WebServiceResponseEventArgs;
            if (webArgs != null)
            {
                var response = webArgs.Response;

                var dsirr = response as DescribeSpotInstanceRequestsResult;
                if (dsirr != null)
                {
                    if (dsirr.SpotInstanceRequests != null)
                    {
                        foreach (var spotInstanceRequest in dsirr.SpotInstanceRequests)
                        {
                            var launchSpecification = spotInstanceRequest.LaunchSpecification;
                            PopulateLaunchSpecificationSecurityGroupNames(launchSpecification);
                        }
                    }
                    return;
                }

                var rsir = response as RequestSpotInstancesResult;
                if (rsir != null)
                {
                    if (rsir.SpotInstanceRequests != null)
                    {
                        foreach (var spotInstanceRequest in rsir.SpotInstanceRequests)
                        {
                            var launchSpecification = spotInstanceRequest.LaunchSpecification;
                            PopulateLaunchSpecificationSecurityGroupNames(launchSpecification);
                        }
                    }
                    return;
                }

                var dir = response as DescribeInstancesResult;
                if (dir != null)
                {
                    if (dir.Reservations != null)
                    {
                        foreach (var reservation in dir.Reservations)
                        {
                            PopulateReservationSecurityGroupNames(reservation);
                        }
                    }
                    return;
                }

                var rir = response as RunInstancesResult;
                if (rir != null)
                {
                    PopulateReservationSecurityGroupNames(rir.Reservation);
                    return;
                }
            }
        }
        private void Count(object sender, ResponseEventArgs e)
        {
            var wsrea = e as WebServiceResponseEventArgs;
            var request = wsrea.Request;

            if (RequestsToCount == null || RequestsToCount(request))
            {
                ResponseCount++;
            }
        }