FileExtensionCollection Class
Namespace: Stride.Core.Assets.IOAssembly: Stride.Core.Assets.dll
A class describing a collection of file extensions, with a facultative description string.
public sealed class FileExtensionCollection
Name | Description | |
---|---|---|
Constructors | ||
FileExtensionCollection(String) | Initializes a new instance of the FileExtensionCollection class. |
|
FileExtensionCollection(String, String, String[]) | Initializes a new instance of the FileExtensionCollection class. |
|
Properties | ||
ConcatenatedExtensions | Gets a string containing all extensions separated with the semi-colon character (;). |
|
Description | Gets the description of this file extension collection. |
|
SingleExtensions | Gets each extension in this collection individually splitted in an System.Collections.Generic.IEnumerable<T>. |
|
Methods | ||
Contains(String) | Indicates whether the given extension matches any of the extension in this collection. |
Constructors
FileExtensionCollection(String)
Initializes a new instance of the FileExtensionCollection class.
public FileExtensionCollection(string extensions)
Parameters
Type | Name | Description |
---|---|---|
System.String | extensions | The extensions to add in this collection. Extensions must be separated with the semi-colon character (;). |
FileExtensionCollection(String, String, String[])
Initializes a new instance of the FileExtensionCollection class.
public FileExtensionCollection(string description, string extensions, params string[] additionalExtensions)
Parameters
Type | Name | Description |
---|---|---|
System.String | description | The description of this file extension collection. Can be null. |
System.String | extensions | The extensions to add in this collection. Extensions must be separated with the semi-colon character (;). |
System.String[] | additionalExtensions | Additional extensions to add in this collection. Extensions inside each string must be separated with the semi-colon character (;). |
Properties
ConcatenatedExtensions
Gets a string containing all extensions separated with the semi-colon character (;).
public string ConcatenatedExtensions { get; }
Property Value
Type | Description |
---|---|
System.String |
Description
Gets the description of this file extension collection.
public string Description { get; }
Property Value
Type | Description |
---|---|
System.String |
SingleExtensions
Gets each extension in this collection individually splitted in an System.Collections.Generic.IEnumerable<T>.
public IEnumerable<string> SingleExtensions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
Contains(String)
Indicates whether the given extension matches any of the extension in this collection.
public bool Contains(string extension)
Parameters
Type | Name | Description |
---|---|---|
System.String | extension | The extension to match. Can contain wildcards. |
Returns
Type | Description |
---|---|
System.Boolean | True if the given extension matches, false otherwise. |