/// <summary> /// Sets the 'DataServiceVersion' HTTP header on the message based on the protocol version specified in the settings. /// </summary> /// <param name="message">The message to set the data service version header on.</param> /// <param name="settings">The <see cref="ODataMessageWriterSettings"/> determining the protocol version to use.</param> internal static void SetDataServiceVersion(ODataMessage message, ODataMessageWriterSettings settings) { DebugUtils.CheckNoExternalCallers(); Debug.Assert(message != null, "message != null"); Debug.Assert(settings != null, "settings != null"); Debug.Assert(settings.Version.HasValue, "settings.Version.HasValue"); string dataServiceVersionString = ODataUtils.ODataVersionToString(settings.Version.Value) + ";"; message.SetHeader(ODataConstants.DataServiceVersionHeader, dataServiceVersionString); }
/// <summary> /// Sets the 'DataServiceVersion' HTTP header on the message based on the protocol version specified in the settings. /// </summary> /// <param name="message">The message to set the data service version header on.</param> /// <param name="settings">The <see cref="ODataMessageWriterSettings"/> determining the protocol version to use.</param> internal static void SetDataServiceVersion(ODataMessage message, ODataMessageWriterSettings settings) { DebugUtils.CheckNoExternalCallers(); Debug.Assert(message != null, "message != null"); Debug.Assert(settings != null, "settings != null"); Debug.Assert(settings.Version.HasValue, "settings.Version.HasValue"); string dataServiceVersionString = ODataUtils.ODataVersionToString(settings.Version.Value) + ";"; message.SetHeader(ODataConstants.DataServiceVersionHeader, dataServiceVersionString); }
internal static void SetDataServiceVersion(ODataMessage message, ODataMessageWriterSettings settings) { string headerValue = ODataUtils.ODataVersionToString(settings.Version.Value) + ";"; message.SetHeader("DataServiceVersion", headerValue); }
internal static void SetDataServiceVersion(ODataMessage message, ODataMessageWriterSettings settings) { string headerValue = ODataUtils.ODataVersionToString(settings.Version.Value) + ";"; message.SetHeader("DataServiceVersion", headerValue); }