Beispiel #1
0
        private void InvokeCollectionWriterAction(ODataMessageWriterTestWrapper messageWriter, ODataCollectionWriter writer, CollectionWriterAction writerAction)
        {
            switch (writerAction)
            {
            case CollectionWriterAction.Start:
                writer.WriteStart(new ODataCollectionStart {
                    Name = "foo"
                });
                break;

            case CollectionWriterAction.Item:
                writer.WriteItem(42);
                break;

            case CollectionWriterAction.End:
                writer.WriteEnd();
                break;

            case CollectionWriterAction.Error:
                messageWriter.WriteError(new ODataError(), false);
                break;
            }
        }
 private void InvokeCollectionWriterAction(ODataMessageWriterTestWrapper messageWriter, ODataCollectionWriter writer, CollectionWriterAction writerAction)
 {
     switch (writerAction)
     {
         case CollectionWriterAction.Start:
             writer.WriteStart(new ODataCollectionStart { Name = "foo" });
             break;
         case CollectionWriterAction.Item:
             writer.WriteItem(42);
             break;
         case CollectionWriterAction.End:
             writer.WriteEnd();
             break;
         case CollectionWriterAction.Error:
             messageWriter.WriteError(new ODataError(), false);
             break;
     }
 }