in serde-generate/src/csharp.rs [259:295]
fn quote_type(&self, format: &Format) -> String {
use Format::*;
match format {
TypeName(x) => self.quote_qualified_name(x),
Unit => "Serde.Unit".into(),
Bool => "bool".into(),
I8 => "sbyte".into(),
I16 => "short".into(),
I32 => "int".into(),
I64 => "long".into(),
I128 => "BigInteger".into(),
U8 => "byte".into(),
U16 => "ushort".into(),
U32 => "uint".into(),
U64 => "ulong".into(),
U128 => "BigInteger".into(),
F32 => "float".into(),
F64 => "double".into(),
Char => "char".into(),
Str => "string".into(),
Bytes => "Serde.ValueArray<byte>".into(),
Option(format) => format!("Serde.Option<{}>", self.quote_type(format)),
Seq(format) => format!("Serde.ValueArray<{}>", self.quote_type(format)),
Map { key, value } => format!(
"Serde.ValueDictionary<{}, {}>",
self.quote_type(key),
self.quote_type(value)
),
Tuple(formats) => format!("({})", self.quote_types(formats)),
TupleArray {
content,
size: _size,
} => format!("Serde.ValueArray<{}>", self.quote_type(content),),
Variable(_) => panic!("unexpected value"),
}
}