Class ExifPropertyCollection<T>
Represents a collection of ExifProperty objects.
Inheritance
Implements
Namespace: ExifLibrary
Assembly: ExifLibrary.dll
Syntax
public class ExifPropertyCollection<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable where T : ExifProperty
Type Parameters
Name | Description |
---|---|
T |
Properties
| Improve this Doc View SourceCount
Gets the number of elements contained in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[ExifTag]
Gets or sets the ExifProperty with the specified tag. Note that this method iterates through the entire collection to find an item with the given tag.
Declaration
public T this[ExifTag tag] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
ExifTag | tag |
Property Value
Type | Description |
---|---|
T |
Item[Int32]
Gets or sets the ExifProperty with the specified index.
Declaration
public T this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
T |
Methods
| Improve this Doc View SourceAdd(T)
Adds an ExifProperty.
Declaration
public void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to add. |
Add(ExifTag, Byte)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, byte value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Byte | value | The value of tag. |
Add(ExifTag, DateTime)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.DateTime | value | The value of tag. |
Add(ExifTag, Double)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, double value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Double | value | The value of tag. |
Add(ExifTag, Int32)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, int value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Int32 | value | The value of tag. |
Add(ExifTag, Object)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, object value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Object | value | The value of tag. |
Add(ExifTag, Single)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, float value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Single | value | The value of tag. |
Add(ExifTag, Single, Single, Single)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, float d, float m, float s)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Single | d | Angular degrees (or clock hours for a timestamp). |
System.Single | m | Angular minutes (or clock minutes for a timestamp). |
System.Single | s | Angular seconds (or clock seconds for a timestamp). |
Add(ExifTag, String)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, string value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.String | value | The value of tag. |
Add(ExifTag, String, Encoding)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, string value, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.String | value | The value of tag. |
System.Text.Encoding | encoding |
Add(ExifTag, UInt16)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, ushort value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.UInt16 | value | The value of tag. |
Add(ExifTag, UInt32)
Adds an ExifProperty with the specified key.
Declaration
public void Add(ExifTag key, uint value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.UInt32 | value | The value of tag. |
AddItem(ExifProperty)
Adds an item to the collection.
Declaration
protected void AddItem(ExifProperty item)
Parameters
Type | Name | Description |
---|---|---|
ExifProperty | item | an item to add to the collection |
Clear()
Removes all items from the collection.
Declaration
public void Clear()
Contains(T)
Determines whether the collection contains the given element.
Declaration
public bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to locate in the collection. |
Returns
Type | Description |
---|---|
System.Boolean | true if the collection contains the given element; otherwise, false. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Contains(ExifTag)
Determines whether the collection contains an element with the specified tag.
Declaration
public bool Contains(ExifTag tag)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | tag | The tag to locate in the collection. |
Returns
Type | Description |
---|---|
System.Boolean | true if the collection contains an element with the tag; otherwise, false. |
Get(ExifTag)
Gets the ExifProperty with the specified key.
Declaration
public ExifProperty Get(ExifTag key)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to get. |
Returns
Type | Description |
---|---|
ExifProperty | The item with the given tag cast to the specified type. If the tag does not exist, or it cannot be cast to the given type it returns null. |
Get<U>(ExifTag)
Gets the ExifProperty with the specified key.
Declaration
public U Get<U>(ExifTag key)
where U : ExifProperty
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to get. |
Returns
Type | Description |
---|---|
U | The item with the given tag cast to the specified type. If the tag does not exist, or it cannot be cast to the given type it returns null. |
Type Parameters
Name | Description |
---|---|
U |
GetEnumerator()
Returns an enumerator to iterate the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> |
GetItem(ExifTag)
Gets an item with the given tag from the collection. If there are multiple items with the same tag, returns the first item with the given tag.
Declaration
protected ExifProperty GetItem(ExifTag tag)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | tag | the tag ıf an item to get from the collection |
Returns
Type | Description |
---|---|
ExifProperty |
GetItems(ExifTag)
Gets a list of items with the given tag from the collection.
Declaration
protected List<ExifProperty> GetItems(ExifTag tag)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | tag | the tag ıf an item to get from the collection |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ExifProperty> |
IndexOf(T)
Returns the index of the given item.
Declaration
public int IndexOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to look for in the collection. |
Returns
Type | Description |
---|---|
System.Int32 |
Remove(T)
Removes the given element from the collection.
Declaration
public bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The element to remove. |
Returns
Type | Description |
---|---|
System.Boolean | true if the element is successfully removed; otherwise, false. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Remove(ExifTag)
Removes all items with the given tag from the collection.
Declaration
public void Remove(ExifTag tag)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | tag |
Remove(IFD)
Removes all items with the given IFD from the collection.
Declaration
public void Remove(IFD ifd)
Parameters
Type | Name | Description |
---|---|---|
IFD | ifd | The IFD section to remove. |
Remove(IEnumerable<T>)
Removes the given elements from the collection.
Declaration
public void Remove(IEnumerable<T> itemsToRemove)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | itemsToRemove | The list of elements to remove. |
Remove(IEnumerable<ExifTag>)
Removes all items with the given tags from the collection.
Declaration
public void Remove(IEnumerable<ExifTag> tags)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ExifTag> | tags |
RemoveAt(Int32)
Removes the item at the given index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the item to remove. |
Set(T)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to set. |
Set(ExifTag, Byte)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, byte value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Byte | value | The value of tag. |
Set(ExifTag, DateTime)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.DateTime | value | The value of tag. |
Set(ExifTag, Double)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, double value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Double | value | The value of tag. |
Set(ExifTag, Int32)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, int value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Int32 | value | The value of tag. |
Set(ExifTag, Object)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, object value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Object | value | The value of tag. |
Set(ExifTag, Single)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, float value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Single | value | The value of tag. |
Set(ExifTag, Single, Single, Single)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, float d, float m, float s)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.Single | d | Angular degrees (or clock hours for a timestamp). |
System.Single | m | Angular minutes (or clock minutes for a timestamp). |
System.Single | s | Angular seconds (or clock seconds for a timestamp). |
Set(ExifTag, String)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, string value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.String | value | The value of tag. |
Set(ExifTag, String, Encoding)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, string value, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.String | value | The value of tag. |
System.Text.Encoding | encoding |
Set(ExifTag, UInt16)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, ushort value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.UInt16 | value | The value of tag. |
Set(ExifTag, UInt32)
Sets an ExifProperty with the specified key. Note that if there are multiple items with the same key, all of them will be replaced by the given item.
Declaration
public void Set(ExifTag key, uint value)
Parameters
Type | Name | Description |
---|---|---|
ExifTag | key | The tag to set. |
System.UInt32 | value | The value of tag. |
SetItem(ExifProperty)
Sets an item in the collection. If there are multiple items with the same tag, replaces all items with the given item.
Declaration
protected void SetItem(ExifProperty item)
Parameters
Type | Name | Description |
---|---|---|
ExifProperty | item | an item to set in the collection |
Explicit Interface Implementations
| Improve this Doc View SourceICollection<T>.CopyTo(T[], Int32)
Declaration
void ICollection<T>.CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | |
System.Int32 | arrayIndex |
ICollection<T>.IsReadOnly
Declaration
bool ICollection<T>.IsReadOnly { get; }
Returns
Type | Description |
---|---|
System.Boolean |
IList<T>.Insert(Int32, T)
Declaration
void IList<T>.Insert(int index, T item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
T | item |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |