/// <summary>
        /// Send a request to the InAppService.
        /// </summary>
        /// <typeparam name="T">The type of response expected from the request. (i.e. Response or a sub-class)</typeparam>
        /// <param name="request">The request</param>
        /// <returns></returns>
        public System.Threading.Tasks.Task <T> SendRequest <T>(BillingRequest <T> request) where T : Response
        {
            //Hack...the Buy responses come in through the Activity (See HandleActivityResult below)
            // So, we must track it somewhere in order to complete the Task associated with it
            // Be careful that you only allow one Buy at a time
            if (request is Buy)
            {
                m_curRequest = request;
            }

            return(request.Execute(this));
        }
Exemple #2
0
 public AzureUsage(IRateCardApi rateCard, IBillingRequest request, CustomerContainer customer)
 {
     Customer       = customer;
     RateCard       = rateCard;
     BillingRequest = request;
 }
 /// <summary>
 /// Invoked using a subscription id - important to ensure that app service principal is at least in the read role for the "subscription"
 /// </summary>
 public AzureRateCard(IBillingRequest rateCardRequest, CustomerContainer customer)
 {
     Customer       = customer;
     BillingRequest = rateCardRequest;
 }