Parse static method

Parse current element to extract server information EwsServiceXmlReader

Implementation

static ExchangeServerInfo Parse(EwsServiceXmlReader reader) {
  EwsUtilities.Assert(reader.HasAttributes, "ExchangeServerVersion.Parse",
      "Current element doesn't have attributes");

  ExchangeServerInfo info = new ExchangeServerInfo();
  info.MajorVersion = reader.ReadAttributeValue<int>("MajorVersion");
  info.MinorVersion = reader.ReadAttributeValue<int>("MinorVersion");
  info.MajorBuildNumber = reader.ReadAttributeValue<int>("MajorBuildNumber");
  info.MinorBuildNumber = reader.ReadAttributeValue<int>("MinorBuildNumber");
  info.VersionString = reader.ReadAttributeValue("Version");
  return info;
}