Class GorgonFileExtensionCollection
A collection of file extensions.
Inheritance
GorgonFileExtensionCollection
Implements
Inherited Members
Namespace: Gorgon.IO
Assembly: Gorgon.Core.dll
Syntax
public class GorgonFileExtensionCollection : GorgonBaseNamedObjectDictionary<GorgonFileExtension>, IGorgonNamedObjectDictionary<GorgonFileExtension>, ICollection<GorgonFileExtension>, IGorgonNamedObjectReadOnlyDictionary<GorgonFileExtension>, IReadOnlyCollection<GorgonFileExtension>, IEnumerable<GorgonFileExtension>, IEnumerable
Constructors
| Edit this page View SourceGorgonFileExtensionCollection()
Initializes a new instance of the GorgonFileExtensionCollection class.
Declaration
public GorgonFileExtensionCollection()
Properties
| Edit this page View Sourcethis[string]
Property to set or return an extension in the collection.
Declaration
public GorgonFileExtension this[string extension] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
string | extension |
Property Value
Type | Description |
---|---|
GorgonFileExtension |
Methods
| Edit this page View SourceAdd(GorgonFileExtension)
Function to add a file extension to the collection.
Declaration
public void Add(GorgonFileExtension extension)
Parameters
Type | Name | Description |
---|---|---|
GorgonFileExtension | extension | Extension to add to the collection. |
Clear()
Function to clear all items from the collection.
Declaration
public void Clear()
Remove(GorgonFileExtension)
Function to remove a file extension from the collection.
Declaration
public void Remove(GorgonFileExtension extension)
Parameters
Type | Name | Description |
---|---|---|
GorgonFileExtension | extension | The file extension to remove from the collection. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | Thrown when the |
Remove(string)
Function to remove a file extension from the collection.
Declaration
public void Remove(string extension)
Parameters
Type | Name | Description |
---|---|---|
string | extension | The file extension to remove from the collection. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
KeyNotFoundException | Thrown when the |