/// <summary>
        /// Adds a context URI projection annotation to the specified ODataPayloadElement.
        /// </summary>
        /// <typeparam name="T">The type of the payload element to work on.</typeparam>
        /// <param name="payloadElement">The payload element to annotate.</param>
        /// <param name="contextUriProjection">The context URI projection to annotate with.</param>
        /// <returns>The annotated payload element, for composability.</returns>
        public static T WithContextUriProjection <T>(this T payloadElement, string contextUriProjection) where T : ODataPayloadElement
        {
            ExceptionUtilities.CheckArgumentNotNull(payloadElement, "payloadElement");

            JsonLightContextUriProjectionAnnotation annotation = new JsonLightContextUriProjectionAnnotation()
            {
                ContextUriProjection = contextUriProjection
            };

            ODataPayloadElementExtensions.SetAnnotation(payloadElement, annotation);
            return(payloadElement);
        }
        /// <summary>
        /// Adds a context URI annotation to the specified ODataPayloadElement.
        /// </summary>
        /// <typeparam name="T">The type of the payload element to work on.</typeparam>
        /// <param name="payloadElement">The payload element to annotate.</param>
        /// <param name="contextUri">The context URI to annotate with.</param>
        /// <returns>The annotated payload element, for composability.</returns>
        public static T WithContextUri <T>(this T payloadElement, string contextUri) where T : ODataPayloadElement
        {
            ExceptionUtilities.CheckArgumentNotNull(payloadElement, "payloadElement");
            JsonLightContextUriAnnotation annotation = null;

            if (contextUri != null)
            {
                annotation = new JsonLightContextUriAnnotation()
                {
                    ContextUri = contextUri
                };
                ODataPayloadElementExtensions.SetAnnotation(payloadElement, annotation);
            }

            return(payloadElement);
        }