| // Todd Berman <tberman@imeem.com> |
| // Distributed under the Thrift Software License |
| // See accompanying file LICENSE or visit the Thrift site at: |
| // http://developers.facebook.com/thrift/using |
| using System.Collections.Generic; |
| namespace Thrift.Protocol |
| public static class TProtocolUtil |
| public static void Skip(TProtocol prot, TType type) |
| // Don't try to decode the string, just skip it. |
| TField field = prot.ReadFieldBegin(); |
| if (field.Type == TType.Stop) |
| TMap map = prot.ReadMapBegin(); |
| for (int i = 0; i < map.Count; i++) |
| Skip(prot, map.ValueType); |
| TSet set = prot.ReadSetBegin(); |
| for (int i = 0; i < set.Count; i++) |
| Skip(prot, set.ElementType); |
| TList list = prot.ReadListBegin(); |
| for (int i = 0; i < list.Count; i++) |
| Skip(prot, list.ElementType); |