David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 1 | // |
| 2 | // TMap.cs |
| 3 | // |
| 4 | // Begin: Aug 19, 2007 |
David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 5 | // Authors: |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 6 | // Todd Berman <tberman@imeem.com> |
| 7 | // |
| 8 | // Distributed under the Thrift Software License |
| 9 | // |
| 10 | // See accompanying file LICENSE or visit the Thrift site at: |
| 11 | // http://developers.facebook.com/thrift/using |
| 12 | |
| 13 | using System; |
| 14 | using System.Collections.Generic; |
| 15 | using System.Text; |
| 16 | |
| 17 | namespace Thrift.Protocol |
| 18 | { |
David Reiss | 46dc629 | 2008-02-06 22:09:58 +0000 | [diff] [blame] | 19 | public struct TMap |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 20 | { |
David Reiss | d831a21 | 2009-02-13 03:09:52 +0000 | [diff] [blame] | 21 | private TType keyType; |
| 22 | private TType valueType; |
| 23 | private int count; |
| 24 | |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 25 | public TMap(TType keyType, TType valueType, int count) |
David Reiss | c9d06ee | 2008-03-18 18:22:43 +0000 | [diff] [blame] | 26 | :this() |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 27 | { |
David Reiss | d831a21 | 2009-02-13 03:09:52 +0000 | [diff] [blame] | 28 | this.keyType = keyType; |
| 29 | this.valueType = valueType; |
| 30 | this.count = count; |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | public TType KeyType |
| 34 | { |
David Reiss | d831a21 | 2009-02-13 03:09:52 +0000 | [diff] [blame] | 35 | get { return keyType; } |
| 36 | set { keyType = value; } |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | public TType ValueType |
| 40 | { |
David Reiss | d831a21 | 2009-02-13 03:09:52 +0000 | [diff] [blame] | 41 | get { return valueType; } |
| 42 | set { valueType = value; } |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | public int Count |
| 46 | { |
David Reiss | d831a21 | 2009-02-13 03:09:52 +0000 | [diff] [blame] | 47 | get { return count; } |
| 48 | set { count = value; } |
David Reiss | 7f42bcf | 2008-01-11 20:59:12 +0000 | [diff] [blame] | 49 | } |
| 50 | } |
| 51 | } |