Table of Contents

Class EnumExtensions

Inheritance
EnumExtensions
Inherited Members
Namespace
TabularEditor
Assembly
TOMWrapper.dll
public static class EnumExtensions

Methods

AllFlagsChanged<T>(T, T, T)

public static bool AllFlagsChanged<T>(this T bits, T oldValue, T newValue) where T : Enum

Parameters

Type Name Description
T bits
T oldValue
T newValue

Returns

Type Description
bool

Type Parameters

Name Description
T

AnyFlagsChanged<T>(T, T, T)

public static bool AnyFlagsChanged<T>(this T bits, T oldValue, T newValue) where T : Enum

Parameters

Type Name Description
T bits
T oldValue
T newValue

Returns

Type Description
bool

Type Parameters

Name Description
T

ContainsDuplicates<T>(IEnumerable<T>)

public static bool ContainsDuplicates<T>(this IEnumerable<T> enumerable)

Parameters

Type Name Description
IEnumerable<T> enumerable

Returns

Type Description
bool

Type Parameters

Name Description
T

ContainsDuplicates<T, U>(IEnumerable<T>, Func<T, U>, IEqualityComparer<U>)

public static bool ContainsDuplicates<T, U>(this IEnumerable<T> enumerable, Func<T, U> selector, IEqualityComparer<U> comparer = null)

Parameters

Type Name Description
IEnumerable<T> enumerable
Func<T, U> selector
IEqualityComparer<U> comparer

Returns

Type Description
bool

Type Parameters

Name Description
T
U

ContainsDuplicates<T, U>(IEnumerable<T>, Func<T, U>, IEqualityComparer<U>, out T)

public static bool ContainsDuplicates<T, U>(this IEnumerable<T> enumerable, Func<T, U> selector, IEqualityComparer<U> comparer, out T firstDuplicate)

Parameters

Type Name Description
IEnumerable<T> enumerable
Func<T, U> selector
IEqualityComparer<U> comparer
T firstDuplicate

Returns

Type Description
bool

Type Parameters

Name Description
T
U

HasAnyFlags<T>(T, T)

public static bool HasAnyFlags<T>(this T value, T flags) where T : Enum

Parameters

Type Name Description
T value
T flags

Returns

Type Description
bool

Type Parameters

Name Description
T

IndexOf<T>(IEnumerable<T>, Predicate<T>)

public static int IndexOf<T>(this IEnumerable<T> enumerable, Predicate<T> predicate)

Parameters

Type Name Description
IEnumerable<T> enumerable
Predicate<T> predicate

Returns

Type Description
int

Type Parameters

Name Description
T