PdfFilterCollection Class
Represents a collection of PdfFilters.
[ComVisible(false)]
public abstract class PdfFilterCollection : IList<PdfFilter>, ICollection<PdfFilter>, IEnumerable<PdfFilter>, IEnumerable
<ComVisible(False)>
Implements IList(Of PdfFilter), ICollection(Of PdfFilter), IEnumerable(Of PdfFilter), IEnumerable
- Inheritance:
- System.ObjectPdfFilterCollection
Implements
Properties
Count
Gets the number of PdfFilters contained in the PdfFilterCollection.
Property Value
- System.Int32
The number of PdfFilters contained in the PdfFilterCollection.
Item[Int32]
Gets or sets the PdfFilter at the specified index.
public PdfFilter this[int index] { get; set; }
Public Property Item(index As Integer) As PdfFilter
Parameters
index
- System.Int32
The zero-based index of the PdfFilter to get or set.
Property Value
Exceptions
- System.ArgumentOutOfRangeException
index
is less than 0 or index
is equal to or greater than Count.
- System.ArgumentNullException
value
is null.
Methods
Add(PdfFilter)
Adds a PdfFilter to the end of the PdfFilterCollection.
Parameters
filter
- PdfFilter
The PdfFilter to be added to the end of the PdfFilterCollection.
Exceptions
- System.ArgumentNullException
filter
is null.
AddFilter(PdfFilterType)
Adds a new filter of the specified type to the end of the PdfFilterCollection.
public PdfFilter AddFilter(PdfFilterType filterType)
Public Function AddFilter(filterType As PdfFilterType) As PdfFilter
Parameters
filterType
- PdfFilterType
Type of a new filter to be added to the end of the PdfFilterCollection.
Returns
A new filter of the specified type added to the end of the PdfFilterCollection.
Remarks
Unknown is not supported by this method.
AddFilter<TPdfFilter>()
Adds a new filter of the specified type to the end of the PdfFilterCollection.
public TPdfFilter AddFilter<TPdfFilter>()
where TPdfFilter : PdfFilter
Public Function AddFilter(Of TPdfFilter As PdfFilter) As TPdfFilter
Returns
- TPdfFilter
A new filter of the specified type added to the end of the PdfFilterCollection.
Type Parameters
TPdfFilter
Type of a new filter to be added to the end of the PdfFilterCollection.
Remarks
PdfUnknownFilter is not supported by this method.
Clear()
Removes all PdfFilters from the PdfFilterCollection.
Contains(PdfFilter)
Determines whether a PdfFilter is in the PdfFilterCollection.
public bool Contains(PdfFilter filter)
Public Function Contains(filter As PdfFilter) As Boolean
Parameters
filter
- PdfFilter
The PdfFilter to locate in the PdfFilterCollection.
Returns
- System.Boolean
true if filter
is found in the PdfFilterCollection; otherwise, false.
CopyTo(PdfFilter[], Int32)
Copies the entire PdfFilterCollection to a compatible one-dimensional array, starting at the specified index of the target array.
public void CopyTo(PdfFilter[] array, int arrayIndex)
Public Sub CopyTo(array As PdfFilter(), arrayIndex As Integer)
Parameters
array
- PdfFilter[]
The one-dimensional System.Array that is the destination of the PdfFilters copied from PdfFilterCollection. The System.Array must have zero-based indexing.
arrayIndex
- System.Int32
The zero-based index in array
at which copying begins.
Exceptions
- System.ArgumentNullException
array
is null.
- System.ArgumentOutOfRangeException
arrayIndex
is less than 0.
- System.ArgumentException
The number of PdfFilters in the source PdfFilterCollection is greater than the available space from arrayIndex
to the end of the destination array
.
GetEnumerator()
Returns an enumerator that iterates through the PdfFilterCollection.
public PdfFilterCollection.Enumerator GetEnumerator()
Public Function GetEnumerator As PdfFilterCollection.Enumerator
Returns
IndexOf(PdfFilter)
Searches for the specified PdfFilter and returns the zero-based index of the first occurrence within the entire PdfFilterCollection.
Parameters
filter
- PdfFilter
The PdfFilter to locate in the PdfFilterCollection.
Returns
- System.Int32
The zero-based index of the first occurrence of filter
within the entire PdfFilterCollection, if found; otherwise, –1.
Insert(Int32, PdfFilter)
Inserts a PdfFilter into the PdfFilterCollection at the specified index.
public void Insert(int index, PdfFilter filter)
Public Sub Insert(index As Integer, filter As PdfFilter)
Parameters
index
- System.Int32
The zero-based index at which filter
should be inserted.
Exceptions
- System.ArgumentOutOfRangeException
index
is less than 0 or index
is greater than Count.
- System.ArgumentNullException
filter
is null.
Remove(PdfFilter)
Removes the first occurrence of a specific PdfFilter from the PdfFilterCollection.
Parameters
filter
- PdfFilter
The PdfFilter to remove from the PdfFilterCollection.
Returns
- System.Boolean
true if filter
is successfully removed; otherwise, false. This method also returns false if filter
was not found in the PdfFilterCollection.
RemoveAt(Int32)
Removes the PdfFilter at the specified index of the PdfFilterCollection.
Parameters
index
- System.Int32
The zero-based index of the PdfFilter to remove.
Exceptions
- System.ArgumentOutOfRangeException
index
- System.ArgumentOutOfRangeException
index
is less than 0 or index
is equal to or greater than Count.