From 67f1f3e8fb749cb032eaea607d287cf669c1f5bf Mon Sep 17 00:00:00 2001 From: stankovski Date: Thu, 26 Feb 2015 09:29:37 -0800 Subject: [PATCH] Added IDeserializationModel to AzureOperationResponse --- src/Common/AzureOperationResponse.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Common/AzureOperationResponse.cs b/src/Common/AzureOperationResponse.cs index f18e7d0add6b3..c4dbf6daff944 100644 --- a/src/Common/AzureOperationResponse.cs +++ b/src/Common/AzureOperationResponse.cs @@ -9,12 +9,30 @@ namespace Microsoft.Azure /// A standard service response including an HTTP status code and request /// ID. /// - public class AzureOperationResponse + public class AzureOperationResponse : IDeserializationModel { /// /// Gets or sets the value that uniquely identifies a request /// made against the service. /// public string RequestId { get; set; } + + /// + /// In an impementing class, deserialize the instance with data from the given Json Token. + /// + /// The Json Token that contains serialized data. + public virtual void DeserializeJson(Newtonsoft.Json.Linq.JToken inputObject) + { + // Do nothing + } + + /// + /// In an implementing class, deserialize the instance with data from the given Xml Container. + /// + /// The Xml Container containing the serialized data. + public virtual void DeserializeXml(System.Xml.Linq.XContainer inputObject) + { + // Do nothing + } } } \ No newline at end of file