Show / Hide Table of Contents

Class XmlTypeCollection

Defines a collection of types known to a XmlSerializer

Inheritance
object
XmlTypeCollection
Implements
ICollection<Type>
IEnumerable<Type>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Serialization
Assembly: NMF.Serialization.dll
Syntax
public sealed class XmlTypeCollection : ICollection<Type>, IEnumerable<Type>, IEnumerable
Remarks

This collection is only a wrapper for an internal collection of type serialization information

Constructors

| Edit this page View Source

XmlTypeCollection(XmlSerializer)

Creates a new typecollection for the given XmlSerializer

Declaration
public XmlTypeCollection(XmlSerializer serializer)
Parameters
Type Name Description
XmlSerializer serializer

The XmlSerializer that will work with this set of types

Properties

| Edit this page View Source

Count

Gives the amount of types known to the XmlSerializer

Declaration
public int Count { get; }
Property Value
Type Description
int
| Edit this page View Source

Serializer

The corresponding XmlSerializer

Declaration
public XmlSerializer Serializer { get; }
Property Value
Type Description
XmlSerializer

Methods

| Edit this page View Source

Add(Type)

Imports the given type to the XmlSerializer

Declaration
public void Add(Type type)
Parameters
Type Name Description
Type type

The 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

| Edit this page View Source

Clear()

Clears the set of types known to the XmlSerializer

Declaration
public void Clear()
| Edit this page View Source

Contains(Type)

Gets a value that indicates whether the given type is already known to the XmlSerializer

Declaration
public bool Contains(Type item)
Parameters
Type Name Description
Type item

The type to look for

Returns
Type Description
bool

True, if the type is already known to the XmlSerializer, otherwise False

| Edit this page View Source

CopyTo(Type[], int)

Copies the known types into an array

Declaration
public void CopyTo(Type[] array, int arrayIndex)
Parameters
Type Name Description
Type[] array

The array to copy to

int arrayIndex

The destination start index

| Edit this page View Source

GetEnumerator()

Gets an enumerator to go through the collection

Declaration
public IEnumerator<Type> GetEnumerator()
Returns
Type Description
IEnumerator<Type>

An IEnumerator object

| Edit this page View Source

Remove(Type)

Removes the given type from the set

Declaration
public bool Remove(Type item)
Parameters
Type Name Description
Type item

The type to remove

Returns
Type Description
bool

A value indicating whether removal was successful

Implements

ICollection<T>
IEnumerable<T>
IEnumerable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX