Exemple #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="jsonLightOutputContext">The output context to write to.</param>
        /// <param name="entitySet">The entity set we are going to write entities for.</param>
        /// <param name="entityType">The entity type for the entries in the feed to be written (or null if the entity set base type should be used).</param>
        /// <param name="writingFeed">true if the writer is created for writing a feed; false when it is created for writing an entry.</param>
        internal ODataJsonLightWriter(
            ODataJsonLightOutputContext jsonLightOutputContext,
            IEdmEntitySet entitySet,
            IEdmEntityType entityType,
            bool writingFeed)
            : base(jsonLightOutputContext, entitySet, entityType, writingFeed)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(jsonLightOutputContext != null, "jsonLightOutputContext != null");

            this.jsonLightOutputContext          = jsonLightOutputContext;
            this.jsonLightEntryAndFeedSerializer = new ODataJsonLightEntryAndFeedSerializer(this.jsonLightOutputContext);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ODataJsonLightValueSerializer"/> class.
 /// </summary>
 /// <param name="outputContext">The output context to use.</param>
 internal ODataJsonLightValueSerializer(ODataJsonLightOutputContext outputContext)
     : base(outputContext)
 {
     DebugUtils.CheckNoExternalCallers();
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="jsonLightOutputContext">The output context to write to.</param>
 internal ODataJsonLightPropertySerializer(ODataJsonLightOutputContext jsonLightOutputContext)
     : base(jsonLightOutputContext)
 {
     DebugUtils.CheckNoExternalCallers();
     this.jsonLightValueSerializer = new ODataJsonLightValueSerializer(this);
 }