@@ -157,7 +157,7 @@ private SharpSerializerXmlSettings createXmlSettings()
157157 settings . IncludeCultureInTypeName = true ;
158158 settings . IncludePublicKeyTokenInTypeName = true ;
159159
160-
160+
161161
162162 // ADVANCED SETTINGS
163163 // Most of the classes needed to alter these settings are in the namespace Polenter.Serialization.Advanced
@@ -173,7 +173,13 @@ private SharpSerializerXmlSettings createXmlSettings()
173173 // serializer.PropertyProvider.PropertiesToIgnore.Add(typeof(List<string>), "Capacity")
174174 settings . AdvancedSettings . PropertiesToIgnore . Add ( typeof ( List < string > ) , "Capacity" ) ;
175175
176-
176+
177+ // PropertyTypesToIgnore
178+ // Sometimes you want to ignore some types during the serialization.
179+ // To ignore a type add these types to the list PropertyTypesToIgnore.
180+ settings . AdvancedSettings . PropertyTypesToIgnore . Add ( typeof ( List < string > ) ) ;
181+
182+
177183 // RootName
178184 // There is always a root element during serialization. Default name of this element is "Root",
179185 // but you can change it to any other text.
@@ -271,6 +277,12 @@ private SharpSerializerBinarySettings createBinarySettings()
271277 settings . AdvancedSettings . PropertiesToIgnore . Add ( typeof ( List < string > ) , "Capacity" ) ;
272278
273279
280+ // PropertyTypesToIgnore
281+ // Sometimes you want to ignore some types during the serialization.
282+ // To ignore a type add these types to the list PropertyTypesToIgnore.
283+ settings . AdvancedSettings . PropertyTypesToIgnore . Add ( typeof ( List < string > ) ) ;
284+
285+
274286 // RootName
275287 // There is always a root element during the serialization. Default name of this element is "Root",
276288 // but you can change it to any other text.
@@ -354,19 +366,20 @@ private SharpSerializer createSerializerWithCustomReaderAndWriter()
354366
355367 var sharpSerializer = new SharpSerializer ( serializer , deserializer ) ;
356368
357-
369+
358370 // there is one more option you can alter directly on your instance of SharpSerializer
359371
360372 // *************************************************************************************
361373 // PropertyProvider
362- // If the advanced setting PropertiesToIgnore are not enough there is possibility to create your own PropertyProvider
374+ // If the advanced setting PropertiesToIgnore or PropertyTypesToIgnore are not enough there is possibility to create your own PropertyProvider
363375 // As a standard there are only properties serialized which:
364376 // - are public
365377 // - are not static
366378 // - does not contain ExcludeFromSerializationAttribute
367379 // - have their set and get accessors
368380 // - are not indexers
369381 // - are not in PropertyProvider.PropertiesToIgnore
382+ // - are not in PropertyProvider.PropertyTypesToIgnore
370383 // You can replace this functionality with an inheritor class of PropertyProvider
371384
372385 sharpSerializer . PropertyProvider = new MyVerySophisticatedPropertyProvider ( ) ;
0 commit comments