The AffineThreadPool class will now work on Mono as well; fixed naming inconsistency for the EnumHelper class; inverted the counting direction used by the Semaphore class so it is easier to read (most other Semaphores count in the direction it is using now)
git-svn-id: file:///srv/devel/repo-conversion/nusu@187 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
11610cbbbe
commit
66f0ae9b34
3 changed files with 34 additions and 27 deletions
|
|
@ -70,14 +70,14 @@ namespace Nuclex.Support {
|
|||
// Look for the lowest value in the enumeration. We initialize the lowest value
|
||||
// to the first enumeration value so we don't have to use some arbitrary starting
|
||||
// value which might actually appear in the enumeration.
|
||||
EnumType lowest = values[0];
|
||||
EnumType lowestValue = values[0];
|
||||
for(int index = 1; index < values.Length; ++index) {
|
||||
if(values[index].CompareTo(lowest) < 0) {
|
||||
lowest = values[index];
|
||||
if(values[index].CompareTo(lowestValue) < 0) {
|
||||
lowestValue = values[index];
|
||||
}
|
||||
}
|
||||
|
||||
return lowest;
|
||||
return lowestValue;
|
||||
}
|
||||
|
||||
/// <summary>Retrieves a list of all values contained in an enumeration</summary>
|
||||
|
|
@ -85,6 +85,10 @@ namespace Nuclex.Support {
|
|||
/// Type of the enumeration whose values will be returned
|
||||
/// </typeparam>
|
||||
/// <returns>All values contained in the specified enumeration</returns>
|
||||
/// <remarks>
|
||||
/// This method produces collectable garbage so it's best to only call it once
|
||||
/// and cache the result.
|
||||
/// </remarks>
|
||||
public static EnumType[] GetValues<EnumType>() {
|
||||
#if XBOX360
|
||||
return GetValuesXbox360<EnumType>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue