コード例 #1
0
ファイル: Reference.cs プロジェクト: davelondon/dontstayin
 /// <remarks/>
 public void OrderDomainsAsync(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID, object userState) {
     if ((this.OrderDomainsOperationCompleted == null)) {
         this.OrderDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOrderDomainsOperationCompleted);
     }
     this.InvokeAsync("OrderDomains", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 dbpItems,
                 sROID}, this.OrderDomainsOperationCompleted, userState);
 }
コード例 #2
0
ファイル: Reference.cs プロジェクト: davelondon/dontstayin
 public string OrderDomains(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID) {
     object[] results = this.Invoke("OrderDomains", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 dbpItems,
                 sROID});
     return ((string)(results[0]));
 }
コード例 #3
0
ファイル: Reference.cs プロジェクト: davelondon/dontstayin
 /// <remarks/>
 public void OrderDomainsAsync(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID) {
     this.OrderDomainsAsync(sCLTRID, credential, shopper, items, dbpItems, sROID, null);
 }
コード例 #4
0
ファイル: DotComDomain.cs プロジェクト: davelondon/dontstayin
		/// <summary>
		/// Registers the domain name and sets WwdResourceID, useful for renewing purchased items later.
		/// </summary>
		public void Register()
		{
			if (Common.Properties.IsDevelopmentEnvironment)
			{
				WwdResourceID = "test domain";
				return;
			}


			Availability preAvailability = CheckAvailability();
			if (preAvailability != Availability.AvailableForRegistration)
			{
				throw new Exception(preAvailability.ToString());
			}

			DomainRegistration domainReg = new DomainRegistration()
			{
				nsArray = this.nsArray,
				registrant = this.registrant,
				order = new OrderItem() { productid = this.productIdForOneYearDotCom },
				tld = this.topLevelDomain,
				sld = this.secondLevelDomain,
				period = this.registrationPeriodInYears,
				autorenewflag = 1
			};

			string transactionID = Guid.NewGuid().ToString();


			RegisterDomainsResponse regDomainResp = new RegisterDomainsResponse(
				wapi.OrderDomains(transactionID, this.credentials, this.shopper, new DomainRegistration[] { domainReg }, null, null));


			//int sleep = 100;
			//DateTime timeout = DateTime.Now.AddMilliseconds(10000);

			//Availability postAvailability = CheckAvailability();
			//while (postAvailability != Availability.NotAvailableForRegistration && DateTime.Now < timeout)
			//{
			//    System.Threading.Thread.Sleep(sleep);
			//    postAvailability = CheckAvailability();
			//}

			//if (postAvailability != Availability.NotAvailableForRegistration)
			//{
			//    throw new Exception("Domain still available after registration");
			//}

			//PollResponse pollResp = new PollResponse(
			//    wapi.Poll(transactionID, this.credentials, null));


			//if (pollResp.ProcessedItems.Count != 1) throw new Exception("transactionID = " + transactionID + ". Poll didn't return expected results: " + pollResp.Xml);
			//WwdResourceID = pollResp.ProcessedItems[0].ResourceID;
		}