/// <summary> /// Initializes a new instance of the <see cref="ODataJsonLightValueSerializer"/> class. /// </summary> /// <param name="propertySerializer">The property serializer to use when writing complex values.</param> /// <param name="initContextUriBuilder">Whether contextUriBuilder should be initialized.</param> internal ODataJsonLightValueSerializer(ODataJsonLightPropertySerializer propertySerializer, bool initContextUriBuilder = false) : base(propertySerializer.JsonLightOutputContext, initContextUriBuilder) { this.propertySerializer = propertySerializer; }
/// <summary> /// Writes an <see cref="ODataProperty"/> as message payload. /// </summary> /// <param name="property">The property to write.</param> private void WritePropertyImplementation(ODataProperty property) { ODataJsonLightPropertySerializer jsonLightPropertySerializer = new ODataJsonLightPropertySerializer(this, /*initContextUriBuilder*/ true); jsonLightPropertySerializer.WriteTopLevelProperty(property); }