ExchangeService.withTargetServerVersion constructor

ExchangeService.withTargetServerVersion(
  1. String targetServerVersion
)
Initializes a new instance of the The version of EWS that the service targets. The time zone to which the service is scoped. Initializes a new instance of the The version (new style) of EWS that the service targets.

Implementation

//ExchangeService(ExchangeVersion requestedServerVersion, TimeZoneInfo timeZone)
//            : super(requestedServerVersion, timeZone)
//        {
//        }

/// <summary>
/// Initializes a new instance of the <see cref="ExchangeService"/> class, targeting
/// the specified version of EWS and scoped to the system's current time zone.
/// </summary>
/// <param name="targetServerVersion">The version (new style) of EWS that the service targets.</param>
/// <remarks>
/// The target version string has a required part and an optional part.
/// The required part is two integers separated by a dot, major.minor
/// The optional part is a minimum required version, minimum=major.minor
/// Examples:
///   X-EWS-TargetVersion: 2.4
///   X-EWS_TargetVersion: 2.9; minimum=2.4
/// </remarks>
ExchangeService.withTargetServerVersion(String targetServerVersion)
  : super.withVersion(ExchangeVersion.Exchange2013) {
  ExchangeService.ValidateTargetVersion(targetServerVersion);
  TargetServerVersion = targetServerVersion;
}