Class ProfileWithLevelList<T, TP, TL>
A generic base class implementing a list of profiles and associated maximum supported levels.
Inheritance
Implements
Inherited Members
Namespace: Emby.Media.Model.Types
Assembly: Emby.Media.Model.dll
Syntax
public class ProfileWithLevelList<T, TP, TL> : List<T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable where T : ProfileWithLevel<TP, TL> where TP : struct, Enum where TL : struct, Enum
Type Parameters
Name | Description |
---|---|
T | A profile and level combination, derived from ProfileWithLevel<TP, TL>. |
TP | The type of the profile enum. |
TL | The type of the level enum. |
Constructors
ProfileWithLevelList()
Initializes a new instance of the ProfileWithLevelList<T, TP, TL> class.
Declaration
public ProfileWithLevelList()
ProfileWithLevelList(IEnumerable<T>)
Initializes a new instance of the ProfileWithLevelList<T, TP, TL> class.
Declaration
public ProfileWithLevelList(IEnumerable<T> list)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | list | The list. |
Methods
Add(TP, TL)
Adds the specified combination of profile and level to the list.
Declaration
public void Add(TP profile, TL level)
Parameters
Type | Name | Description |
---|---|---|
TP | profile | The profile. |
TL | level | The level. |
ContainsProfile(TP)
Determines whether the list contains profile.
Declaration
public bool ContainsProfile(TP profile)
Parameters
Type | Name | Description |
---|---|---|
TP | profile | The profile. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetLevel(TP)
Returns the maximum supported level for the specified profile.
Declaration
public TL GetLevel(TP profile)
Parameters
Type | Name | Description |
---|---|---|
TP | profile | The profile. |
Returns
Type | Description |
---|---|
TL |
GetMaxAndLowerLevels()
Returns a list of the level having the highest ordinal and all lower levels.
Declaration
public IReadOnlyList<TL> GetMaxAndLowerLevels()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<TL> |
GetMaxLevel()
Returns the level having the highest ordinal.
Declaration
public TL? GetMaxLevel()
Returns
Type | Description |
---|---|
System.Nullable<TL> |
GetProfileLevelInformation()
Creates a list of ProfileLevelInformation objects for the contained items.
Declaration
public IList<ProfileLevelInformation> GetProfileLevelInformation()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ProfileLevelInformation> |
GetProfiles()
Returns all profiles.
Declaration
public IReadOnlyList<TP> GetProfiles()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<TP> |
HasProfileWithBitDepth(Int32)
Determines whether a profile in the collection supports the specified bit depth.
Declaration
public bool HasProfileWithBitDepth(int bitDepth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | bitDepth | The bit depth. |
Returns
Type | Description |
---|---|
System.Boolean |
|
RemoveProfile(TP)
Returns the maximum supported level for the specified profile.
Declaration
public void RemoveProfile(TP profile)
Parameters
Type | Name | Description |
---|---|---|
TP | profile | The profile. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |