internal override void Parse() { XElement rootElements = Document.Element(GetSchema() + GetSubscriptionParser); var subscriptionItem = new SubscriptionInformation { AccountAdminLiveId = (string) rootElements.Element(GetSchema() + "AccountAdminLiveEmailId"), SubscriptionId = (string) rootElements.Element(GetSchema() + "SubscriptionId"), SubscriptionName = (string) rootElements.Element(GetSchema() + "SubscriptionName"), ServiceAdminLiveId = (string) rootElements.Element(GetSchema() + "ServiceAdminLiveEmailId"), CurrentCoreCount = (int) rootElements.Element(GetSchema() + "CurrentCoreCount"), CurrentHostedServices = (int) rootElements.Element(GetSchema() + "CurrentHostedServices"), CurrentStorageAccounts = (int) rootElements.Element(GetSchema() + "CurrentStorageAccounts"), MaxCoreCount = (int) rootElements.Element(GetSchema() + "MaxCoreCount"), MaxHostedServices = (int) rootElements.Element(GetSchema() + "MaxHostedServices"), MaxStorageAccounts = (int) rootElements.Element(GetSchema() + "MaxStorageAccounts"), SubscriptionStatus = (SubscriptionStatus) Enum.Parse(typeof (SubscriptionStatus), rootElements.Element(GetSchema() + "SubscriptionStatus").Value) }; CommandResponse = subscriptionItem; }
public GetSubscriptionParser(XDocument document) : base(document) { CommandResponse = new SubscriptionInformation(); }