Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="jsonLightInputContext">The JsonLight input context to read from.</param>
        protected ODataJsonLightDeserializer(ODataJsonLightInputContext jsonLightInputContext)
            : base(jsonLightInputContext)
        {
            Debug.Assert(jsonLightInputContext != null, "jsonLightInputContext != null");

            this.jsonLightInputContext = jsonLightInputContext;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="jsonLightInputContext">The input to read the payload from.</param>
 /// <param name="navigationSource">The navigation source we are going to read entities for.</param>
 /// <param name="expectedEntityType">The expected entity type for the resource to be read (in case of resource reader) or entries in the resource set to be read (in case of resource set reader).</param>
 public ODataJsonLightDeltaReader(
     ODataJsonLightInputContext jsonLightInputContext,
     IEdmNavigationSource navigationSource,
     IEdmEntityType expectedEntityType)
 {
     this.underlyingReader = new ODataJsonLightReader(jsonLightInputContext, navigationSource, expectedEntityType, /*readingResourceSet*/ true, /*readingParameter*/ false, /*readingDelta*/ true, /*listener*/ null);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="jsonLightInputContext">The input to read the payload from.</param>
        /// <param name="operation">The operation import whose parameters are being read.</param>
        internal ODataJsonLightParameterReader(ODataJsonLightInputContext jsonLightInputContext, IEdmOperation operation)
            : base(jsonLightInputContext, operation)
        {
            Debug.Assert(jsonLightInputContext != null, "jsonLightInputContext != null");
            Debug.Assert(jsonLightInputContext.ReadingResponse == false, "jsonLightInputContext.ReadingResponse == false");
            Debug.Assert(operation != null, "operationImport != null");

            this.jsonLightInputContext          = jsonLightInputContext;
            this.jsonLightParameterDeserializer = new ODataJsonLightParameterDeserializer(this, jsonLightInputContext);
            Debug.Assert(this.jsonLightInputContext.Model.IsUserModel(), "this.jsonLightInputContext.Model.IsUserModel()");
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="jsonLightInputContext">The input to read the payload from.</param>
        /// <param name="expectedItemTypeReference">The expected type for the items in the collection.</param>
        /// <param name="listener">If not null, the reader will notify the implementer of the interface of relevant state changes in the reader.</param>
        internal ODataJsonLightCollectionReader(
            ODataJsonLightInputContext jsonLightInputContext,
            IEdmTypeReference expectedItemTypeReference,
            IODataReaderWriterListener listener)
            : base(jsonLightInputContext, expectedItemTypeReference, listener)
        {
            Debug.Assert(jsonLightInputContext != null, "jsonLightInputContext != null");

            this.jsonLightInputContext           = jsonLightInputContext;
            this.jsonLightCollectionDeserializer = new ODataJsonLightCollectionDeserializer(jsonLightInputContext);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="inputContext">The input context to read the content from.</param>
 /// <param name="synchronous">true if the reader is created for synchronous operation; false for asynchronous.</param>
 internal ODataJsonLightBatchReader(ODataJsonLightInputContext inputContext, bool synchronous)
     : base(inputContext, synchronous)
 {
     this.batchStream = new ODataJsonLightBatchReaderStream(inputContext);
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="jsonLightInputContext">The JsonLight input context to read from.</param>
 internal ODataJsonLightServiceDocumentDeserializer(ODataJsonLightInputContext jsonLightInputContext)
     : base(jsonLightInputContext)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="jsonLightInputContext">The JsonLight input context to read from.</param>
 internal ODataJsonLightEntityReferenceLinkDeserializer(ODataJsonLightInputContext jsonLightInputContext)
     : base(jsonLightInputContext)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="parameterReader">The JSON Light parameter reader.</param>
 /// <param name="jsonLightInputContext">The JsonLight input context to read from.</param>
 internal ODataJsonLightParameterDeserializer(ODataJsonLightParameterReader parameterReader, ODataJsonLightInputContext jsonLightInputContext)
     : base(jsonLightInputContext)
 {
     this.parameterReader = parameterReader;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="jsonLightInputContext">The JsonLight input context to read from.</param>
 internal ODataJsonLightCollectionDeserializer(ODataJsonLightInputContext jsonLightInputContext)
     : base(jsonLightInputContext)
 {
     this.propertyAndAnnotationCollector = this.CreatePropertyAndAnnotationCollector();
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="jsonLightInputContext">The JsonLight input context to read from.</param>
 internal ODataJsonLightPayloadKindDetectionDeserializer(ODataJsonLightInputContext jsonLightInputContext)
     : base(jsonLightInputContext)
 {
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="jsonLightInputContext">The JsonLight input context to read from.</param>
 internal ODataJsonLightErrorDeserializer(ODataJsonLightInputContext jsonLightInputContext)
     : base(jsonLightInputContext)
 {
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="inputContext">The JsonLight input context.</param>
 internal ODataJsonLightBatchReaderStream(ODataJsonLightInputContext inputContext)
 {
     Debug.Assert(inputContext != null, "inputContext != null");
     this.inputContext = inputContext;
 }