Пример #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="outputContext">The output context to write to.</param>
        protected ODataSerializer(ODataOutputContext outputContext)
        {
            Debug.Assert(outputContext != null, "outputContext != null");

            this.outputContext   = outputContext;
            this.WriterValidator = outputContext.WriterValidator;
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="outputContext">The output context to write to.</param>
        /// <param name="operation">The operation import whose parameters will be written.</param>
        protected ODataParameterWriterCore(ODataOutputContext outputContext, IEdmOperation operation)
        {
            Debug.Assert(outputContext != null, "outputContext != null");

            this.outputContext = outputContext;
            this.operation     = operation;
            this.scopes.Push(ParameterWriterState.Start);
        }
Пример #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="outputContext">The output context to write to.</param>
        /// <param name="expectedItemType">The type reference of the expected item type or null if no expected item type exists.</param>
        /// <param name="listener">If not null, the writer will notify the implementer of the interface of relevant state changes in the writer.</param>
        protected ODataCollectionWriterCore(ODataOutputContext outputContext, IEdmTypeReference expectedItemType, IODataReaderWriterListener listener)
        {
            Debug.Assert(outputContext != null, "outputContext != null");

            this.outputContext    = outputContext;
            this.expectedItemType = expectedItemType;
            this.listener         = listener;
            this.scopes.Push(new Scope(CollectionWriterState.Start, null));
        }
Пример #4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="outputContext">The output context to write to.</param>
 /// <param name="itemTypeReference">The item type of the collection being written or null if no metadata is available.</param>
 protected ODataCollectionWriterCore(ODataOutputContext outputContext, IEdmTypeReference itemTypeReference)
     : this(outputContext, itemTypeReference, null)
 {
 }