/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input to read from.</param> /// <param name="expectedItemTypeReference">The expected type reference 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> protected ODataCollectionReaderCoreAsync( ODataInputContext inputContext, IEdmTypeReference expectedItemTypeReference, IODataReaderWriterListener listener) : base(inputContext, expectedItemTypeReference, listener) { }
/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input to read the payload from.</param> /// <param name="readingFeed">true if the reader is created for reading a feed; false when it is created for reading an entry.</param> /// <param name="listener">If not null, the reader will notify the implementer of the interface of relevant state changes in the reader.</param> protected ODataReaderCoreAsync( ODataInputContext inputContext, bool readingFeed, IODataReaderWriterListener listener) : base(inputContext, readingFeed, listener) { }
/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input to read from.</param> /// <param name="operation">The operation import whose parameters are being read.</param> protected ODataParameterReaderCore( ODataInputContext inputContext, IEdmOperation operation) { this.inputContext = inputContext; this.operation = operation; this.EnterScope(ODataParameterReaderState.Start, null, null); }
/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input to read from.</param> /// <param name="expectedItemTypeReference">The expected type reference 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> protected ODataCollectionReaderCore( ODataInputContext inputContext, IEdmTypeReference expectedItemTypeReference, IODataReaderWriterListener listener) { this.inputContext = inputContext; this.expectedItemTypeReference = expectedItemTypeReference; if (this.expectedItemTypeReference == null) { // NOTE: collections cannot specify a type name for the collection itself, so always passing null. this.collectionValidator = new CollectionWithoutExpectedTypeValidator(/*expectedItemTypeName*/ null); } this.listener = listener; this.EnterScope(ODataCollectionReaderState.Start, null); }
/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input to read the payload from.</param> /// <param name="readingFeed">true if the reader is created for reading a feed; false when it is created for reading an entry.</param> /// <param name="listener">If not null, the reader will notify the implementer of the interface of relevant state changes in the reader.</param> protected ODataReaderCore( ODataInputContext inputContext, bool readingFeed, IODataReaderWriterListener listener) { Debug.Assert(inputContext != null, "inputContext != null"); this.inputContext = inputContext; this.readingFeed = readingFeed; this.listener = listener; this.currentEntryDepth = 0; // create a collection validator when reading a top-level feed and a user model is present if (this.readingFeed && this.inputContext.Model.IsUserModel()) { this.feedValidator = new FeedWithoutExpectedTypeValidator(); } }
/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input to read from.</param> /// <param name="operation">The operation whose parameters are being read.</param> protected ODataParameterReaderCoreAsync( ODataInputContext inputContext, IEdmOperation operation) : base(inputContext, operation) { }
/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input context to read from.</param> protected ODataDeserializer(ODataInputContext inputContext) { Debug.Assert(inputContext != null, "inputContext != null"); this.inputContext = inputContext; }