Class SerializerTypeCollection
- Namespace
- NMF.Serialization
- Assembly
- NMF.Serialization.dll
Defines a collection of types known to a XmlSerializer
public sealed class SerializerTypeCollection : ICollection<Type>, IEnumerable<Type>, IEnumerable
- Inheritance
-
SerializerTypeCollection
- Implements
- Inherited Members
Remarks
This collection is only a wrapper for an internal collection of type serialization information
Constructors
SerializerTypeCollection(Serializer)
Creates a new typecollection for the given XmlSerializer
public SerializerTypeCollection(Serializer serializer)
Parameters
serializer
SerializerThe XmlSerializer that will work with this set of types
Properties
Count
Gives the amount of types known to the XmlSerializer
public int Count { get; }
Property Value
Serializer
The corresponding XmlSerializer
public Serializer Serializer { get; }
Property Value
Methods
Add(Type)
Imports the given type to the XmlSerializer
public void Add(Type type)
Parameters
type
TypeThe type to import
Remarks
Note that importing a type will also import all the property types of this type, if they aren't already imported
Clear()
Clears the set of types known to the XmlSerializer
public void Clear()
Contains(Type)
Gets a value that indicates whether the given type is already known to the XmlSerializer
public bool Contains(Type item)
Parameters
item
TypeThe type to look for
Returns
- bool
True, if the type is already known to the XmlSerializer, otherwise False
CopyTo(Type[], int)
Copies the known types into an array
public void CopyTo(Type[] array, int arrayIndex)
Parameters
GetEnumerator()
Gets an enumerator to go through the collection
public IEnumerator<Type> GetEnumerator()
Returns
- IEnumerator<Type>
An IEnumerator object
Remove(Type)
Removes the given type from the set
public bool Remove(Type item)
Parameters
item
TypeThe type to remove
Returns
- bool
A value indicating whether removal was successful