Пример #1
0
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public virtual void DeserializeJson(JToken inputObject)
 {
     if (inputObject != null && inputObject.Type != JTokenType.Null)
     {
         JToken countValue = inputObject["count"];
         if (countValue != null && countValue.Type != JTokenType.Null)
         {
             this.Count = ((int)countValue);
         }
         JToken resultsSequence = ((JToken)inputObject["results"]);
         if (resultsSequence != null && resultsSequence.Type != JTokenType.Null)
         {
             foreach (JToken resultsValue in ((JArray)resultsSequence))
             {
                 Industry industry = new Industry();
                 industry.DeserializeJson(resultsValue);
                 this.Results.Add(industry);
             }
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public virtual void DeserializeJson(JToken inputObject)
 {
     if (inputObject != null && inputObject.Type != JTokenType.Null)
     {
         JToken addressValue = inputObject["address"];
         if (addressValue != null && addressValue.Type != JTokenType.Null)
         {
             Address address = new Address();
             address.DeserializeJson(addressValue);
             this.Address = address;
         }
         JToken areYouSellingToOtherValue = inputObject["areYouSellingToOther"];
         if (areYouSellingToOtherValue != null && areYouSellingToOtherValue.Type != JTokenType.Null)
         {
             this.AreYouSellingToOther = ((string)areYouSellingToOtherValue);
         }
         JToken areYouTheDecisionMakerValue = inputObject["areYouTheDecisionMaker"];
         if (areYouTheDecisionMakerValue != null && areYouTheDecisionMakerValue.Type != JTokenType.Null)
         {
             this.AreYouTheDecisionMaker = ((bool)areYouTheDecisionMakerValue);
         }
         JToken brandValue = inputObject["brand"];
         if (brandValue != null && brandValue.Type != JTokenType.Null)
         {
             this.Brand = ((string)brandValue);
         }
         JToken cellValue = inputObject["cell"];
         if (cellValue != null && cellValue.Type != JTokenType.Null)
         {
             this.Cell = ((string)cellValue);
         }
         JToken commentsValue = inputObject["comments"];
         if (commentsValue != null && commentsValue.Type != JTokenType.Null)
         {
             this.Comments = ((string)commentsValue);
         }
         JToken companyNameValue = inputObject["companyName"];
         if (companyNameValue != null && companyNameValue.Type != JTokenType.Null)
         {
             this.CompanyName = ((string)companyNameValue);
         }
         JToken emailValue = inputObject["email"];
         if (emailValue != null && emailValue.Type != JTokenType.Null)
         {
             this.Email = ((string)emailValue);
         }
         JToken entryDateValue = inputObject["entryDate"];
         if (entryDateValue != null && entryDateValue.Type != JTokenType.Null)
         {
             this.EntryDate = ((DateTimeOffset)entryDateValue);
         }
         JToken firstNameValue = inputObject["firstName"];
         if (firstNameValue != null && firstNameValue.Type != JTokenType.Null)
         {
             this.FirstName = ((string)firstNameValue);
         }
         JToken idValue = inputObject["id"];
         if (idValue != null && idValue.Type != JTokenType.Null)
         {
             this.ID = ((int)idValue);
         }
         JToken ifNotDecisionMakerWhoIsValue = inputObject["ifNotDecisionMakerWhoIs"];
         if (ifNotDecisionMakerWhoIsValue != null && ifNotDecisionMakerWhoIsValue.Type != JTokenType.Null)
         {
             this.IfNotDecisionMakerWhoIs = ((string)ifNotDecisionMakerWhoIsValue);
         }
         JToken industryValue = inputObject["industry"];
         if (industryValue != null && industryValue.Type != JTokenType.Null)
         {
             Industry industry = new Industry();
             industry.DeserializeJson(industryValue);
             this.Industry = industry;
         }
         JToken lastNameValue = inputObject["lastName"];
         if (lastNameValue != null && lastNameValue.Type != JTokenType.Null)
         {
             this.LastName = ((string)lastNameValue);
         }
         JToken needCustomizedValue = inputObject["needCustomized"];
         if (needCustomizedValue != null && needCustomizedValue.Type != JTokenType.Null)
         {
             this.NeedCustomized = ((bool)needCustomizedValue);
         }
         JToken needEmbroideryValue = inputObject["needEmbroidery"];
         if (needEmbroideryValue != null && needEmbroideryValue.Type != JTokenType.Null)
         {
             this.NeedEmbroidery = ((bool)needEmbroideryValue);
         }
         JToken needLabCoatsValue = inputObject["needLabCoats"];
         if (needLabCoatsValue != null && needLabCoatsValue.Type != JTokenType.Null)
         {
             this.NeedLabCoats = ((bool)needLabCoatsValue);
         }
         JToken needNonMedicalValue = inputObject["needNonMedical"];
         if (needNonMedicalValue != null && needNonMedicalValue.Type != JTokenType.Null)
         {
             this.NeedNonMedical = ((bool)needNonMedicalValue);
         }
         JToken needPrintedTopsValue = inputObject["needPrintedTops"];
         if (needPrintedTopsValue != null && needPrintedTopsValue.Type != JTokenType.Null)
         {
             this.NeedPrintedTops = ((bool)needPrintedTopsValue);
         }
         JToken needScrubsValue = inputObject["needScrubs"];
         if (needScrubsValue != null && needScrubsValue.Type != JTokenType.Null)
         {
             this.NeedScrubs = ((bool)needScrubsValue);
         }
         JToken numberOfOutfittedValue = inputObject["numberOfOutfitted"];
         if (numberOfOutfittedValue != null && numberOfOutfittedValue.Type != JTokenType.Null)
         {
             this.NumberOfOutfitted = ((string)numberOfOutfittedValue);
         }
         JToken phoneValue = inputObject["phone"];
         if (phoneValue != null && phoneValue.Type != JTokenType.Null)
         {
             this.Phone = ((string)phoneValue);
         }
         JToken webValue = inputObject["web"];
         if (webValue != null && webValue.Type != JTokenType.Null)
         {
             this.Web = ((string)webValue);
         }
         JToken whichAreYouSeekingToOutfitValue = inputObject["whichAreYouSeekingToOutfit"];
         if (whichAreYouSeekingToOutfitValue != null && whichAreYouSeekingToOutfitValue.Type != JTokenType.Null)
         {
             this.WhichAreYouSeekingToOutfit = ((string)whichAreYouSeekingToOutfitValue);
         }
         JToken whoWillWearNonMedicalValue = inputObject["whoWillWearNonMedical"];
         if (whoWillWearNonMedicalValue != null && whoWillWearNonMedicalValue.Type != JTokenType.Null)
         {
             this.WhoWillWearNonMedical = ((bool)whoWillWearNonMedicalValue);
         }
         JToken whoWillWearPatientCareValue = inputObject["whoWillWearPatientCare"];
         if (whoWillWearPatientCareValue != null && whoWillWearPatientCareValue.Type != JTokenType.Null)
         {
             this.WhoWillWearPatientCare = ((bool)whoWillWearPatientCareValue);
         }
     }
 }