示例#1
0
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public virtual void DeserializeJson(JToken inputObject)
 {
     if (inputObject != null && inputObject.Type != JTokenType.Null)
     {
         JToken cultureValue = inputObject["Culture"];
         if (cultureValue != null && cultureValue.Type != JTokenType.Null)
         {
             this.Culture = ((string)cultureValue);
         }
         JToken modifiedDateValue = inputObject["ModifiedDate"];
         if (modifiedDateValue != null && modifiedDateValue.Type != JTokenType.Null)
         {
             this.ModifiedDate = ((DateTimeOffset)modifiedDateValue);
         }
         JToken productDescriptionValue = inputObject["ProductDescription"];
         if (productDescriptionValue != null && productDescriptionValue.Type != JTokenType.Null)
         {
             ProductDescription productDescription = new ProductDescription();
             productDescription.DeserializeJson(productDescriptionValue);
             this.ProductDescription = productDescription;
         }
         JToken productDescriptionIDValue = inputObject["ProductDescriptionID"];
         if (productDescriptionIDValue != null && productDescriptionIDValue.Type != JTokenType.Null)
         {
             this.ProductDescriptionID = ((int)productDescriptionIDValue);
         }
         JToken productModelValue = inputObject["ProductModel"];
         if (productModelValue != null && productModelValue.Type != JTokenType.Null)
         {
             ProductModel productModel = new ProductModel();
             productModel.DeserializeJson(productModelValue);
             this.ProductModel = productModel;
         }
         JToken productModelIDValue = inputObject["ProductModelID"];
         if (productModelIDValue != null && productModelIDValue.Type != JTokenType.Null)
         {
             this.ProductModelID = ((int)productModelIDValue);
         }
         JToken rowguidValue = inputObject["rowguid"];
         if (rowguidValue != null && rowguidValue.Type != JTokenType.Null)
         {
             this.Rowguid = ((string)rowguidValue);
         }
     }
 }
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public virtual void DeserializeJson(JToken inputObject)
 {
     if (inputObject != null && inputObject.Type != JTokenType.Null)
     {
         JToken cultureValue = inputObject["Culture"];
         if (cultureValue != null && cultureValue.Type != JTokenType.Null)
         {
             this.Culture = ((string)cultureValue);
         }
         JToken modifiedDateValue = inputObject["ModifiedDate"];
         if (modifiedDateValue != null && modifiedDateValue.Type != JTokenType.Null)
         {
             this.ModifiedDate = ((DateTimeOffset)modifiedDateValue);
         }
         JToken productDescriptionValue = inputObject["ProductDescription"];
         if (productDescriptionValue != null && productDescriptionValue.Type != JTokenType.Null)
         {
             ProductDescription productDescription = new ProductDescription();
             productDescription.DeserializeJson(productDescriptionValue);
             this.ProductDescription = productDescription;
         }
         JToken productDescriptionIDValue = inputObject["ProductDescriptionID"];
         if (productDescriptionIDValue != null && productDescriptionIDValue.Type != JTokenType.Null)
         {
             this.ProductDescriptionID = ((int)productDescriptionIDValue);
         }
         JToken productModelValue = inputObject["ProductModel"];
         if (productModelValue != null && productModelValue.Type != JTokenType.Null)
         {
             ProductModel productModel = new ProductModel();
             productModel.DeserializeJson(productModelValue);
             this.ProductModel = productModel;
         }
         JToken productModelIDValue = inputObject["ProductModelID"];
         if (productModelIDValue != null && productModelIDValue.Type != JTokenType.Null)
         {
             this.ProductModelID = ((int)productModelIDValue);
         }
         JToken rowguidValue = inputObject["rowguid"];
         if (rowguidValue != null && rowguidValue.Type != JTokenType.Null)
         {
             this.Rowguid = ((string)rowguidValue);
         }
     }
 }