/// <summary> /// Constructor. /// </summary> /// <param name="verboseJsonInputContext">The input to read the payload from.</param> /// <param name="functionImport">The function import whose parameters are being read.</param> internal ODataVerboseJsonParameterReader(ODataVerboseJsonInputContext verboseJsonInputContext, IEdmFunctionImport functionImport) : base(verboseJsonInputContext, functionImport) { DebugUtils.CheckNoExternalCallers(); Debug.Assert(verboseJsonInputContext != null, "verboseJsonInputContext != null"); Debug.Assert(verboseJsonInputContext.ReadingResponse == false, "verboseJsonInputContext.ReadingResponse == false"); this.verboseJsonInputContext = verboseJsonInputContext; this.verboseJsonPropertyAndValueDeserializer = new ODataVerboseJsonPropertyAndValueDeserializer(verboseJsonInputContext); Debug.Assert(this.verboseJsonInputContext.Model.IsUserModel(), "this.verboseJsonInputContext.Model.IsUserModel()"); }
/// <summary> /// This method creates and reads the property from the input and /// returns an <see cref="ODataProperty"/> representing the read property. /// </summary> /// <param name="Property">The <see cref="IEdmProperty"/> producing the property to be read.</param> /// <param name="expectedPropertyTypeReference">The expected type reference of the property to read.</param> /// <returns>An <see cref="ODataProperty"/> representing the read property.</returns> private ODataProperty ReadPropertyImplementation(IEdmStructuralProperty Property, IEdmTypeReference expectedPropertyTypeReference) { ODataVerboseJsonPropertyAndValueDeserializer jsonPropertyAndValueDeserializer = new ODataVerboseJsonPropertyAndValueDeserializer(this); return(jsonPropertyAndValueDeserializer.ReadTopLevelProperty(Property, expectedPropertyTypeReference)); }