Exemple #1
0
 private T CoerceStringToType <T>(string s)
 {
     return((T)CoercionHelpers.CreateCoercionMap()[typeof(T)](s));
 }
Exemple #2
0
        public void CsvSerializerHelpers_CoercionMap_DoNotTrimStringValues()
        {
            const string s = "  field0  ";

            Assert.Equal(s, CoercionHelpers.CreateCoercionMap()[typeof(string)](s));
        }
Exemple #3
0
 static CsvSerializer()
 {
     CsvSerializer <T> .CoercionMap = CoercionHelpers.CreateCoercionMap();
 }