66using ServiceStack . Text ;
77using ServiceStack . Text . Common ;
88using ServiceStack . Text . Jsv ;
9- using System . Linq ;
10- using System . Threading ;
11- using ServiceStack . Web ;
129
1310namespace ServiceStack . Serialization
1411{
@@ -83,7 +80,7 @@ public StringMapTypeDeserializer(Type type)
8380 }
8481 }
8582
86- public object PopulateFromMap ( object instance , IDictionary < string , string > keyValuePairs , List < string > ignoredWarningsOnPropertyNames = null )
83+ public object PopulateFromMap ( object instance , IDictionary < string , string > keyValuePairs , HashSet < string > ignoredWarningsOnPropertyNames = null )
8784 {
8885 var errors = new List < RequestBindingError > ( ) ;
8986
@@ -109,7 +106,7 @@ public object PopulateFromMap(object instance, IDictionary<string, string> keyVa
109106 return instance ;
110107 }
111108
112- public object PopulateFromMap ( object instance , NameValueCollection nameValues , List < string > ignoredWarningsOnPropertyNames = null )
109+ public object PopulateFromMap ( object instance , NameValueCollection nameValues , HashSet < string > ignoredWarningsOnPropertyNames = null )
113110 {
114111 var errors = new List < RequestBindingError > ( ) ;
115112
@@ -137,7 +134,8 @@ public object PopulateFromMap(object instance, NameValueCollection nameValues, L
137134 }
138135
139136
140- private object PopulateFromKeyValue ( object instance , string propertyName , string propertyTextValue , out PropertySerializerEntry propertySerializerEntry , List < RequestBindingError > errors , List < string > ignoredWarningsOnPropertyNames = null )
137+ private object PopulateFromKeyValue ( object instance , string propertyName , string propertyTextValue , out PropertySerializerEntry propertySerializerEntry , List < RequestBindingError > errors ,
138+ HashSet < string > ignoredWarningsOnPropertyNames = null )
141139 {
142140 propertySerializerEntry = null ;
143141
@@ -154,11 +152,10 @@ private object PopulateFromKeyValue(object instance, string propertyName, string
154152 return instance ;
155153 }
156154
157- var ignoredProperty = propertyName . ToLowerInvariant ( ) ;
158- if ( ignoredWarningsOnPropertyNames != null && ! ignoredWarningsOnPropertyNames . Contains ( ignoredProperty )
155+ if ( ignoredWarningsOnPropertyNames != null && ! ignoredWarningsOnPropertyNames . Contains ( propertyName )
159156 && ! type . HasAttributeCached < FallbackRouteAttribute > ( ) )
160157 {
161- Log . WarnFormat ( "Property '{0}' does not exist on type '{1}'" , ignoredProperty , type . FullName ) ;
158+ Log . WarnFormat ( "Property '{0}' does not exist on type '{1}'" , propertyName , type . FullName ) ;
162159 }
163160 return instance ;
164161 }
0 commit comments