Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    FileExtensionCollection Class

    Namespace: Stride.Core.Assets.IO
    Assembly: Stride.Core.Assets.dll

    A class describing a collection of file extensions, with a facultative description string.

    System.Object → FileExtensionCollection
    Derived from FileExtensionCollection:

    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.

    | Improve this Doc View Source

    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 (;).

    | Improve this Doc View Source

    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>
    | Improve this Doc View Source

    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.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation