示例#1
0
		/// <summary>
		/// Executes a BillingRequest
		/// </summary>
		/// <param name="request"></param>
		/// <returns></returns>
		bool Execute(BillingRequest request)
		{
			request.Service = this;

			if (mService != null)
			{
				try
				{
					var requestId = request.Run(mService);
					mSentRequests.Add(requestId, request);
					return true;
				}
				catch (RemoteException)
				{
					mService = null;
					request.OnRemoteException();
				}
			}
			else
			{
				PendingRequests.Add(request);
				return bindToMarketBillingService();
			}

			return false;
		}