Found some more bits and pieces of WinRT + Xbox 360 support code and removed them
git-svn-id: file:///srv/devel/repo-conversion/nusu@328 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
3f1809e5cc
commit
6053f5a877
|
@ -295,12 +295,7 @@ namespace Nuclex.Support.Collections {
|
||||||
}
|
}
|
||||||
|
|
||||||
index += this.firstBlockStartIndex;
|
index += this.firstBlockStartIndex;
|
||||||
#if WINDOWS
|
|
||||||
blockIndex = Math.DivRem(index, this.blockSize, out subIndex);
|
blockIndex = Math.DivRem(index, this.blockSize, out subIndex);
|
||||||
#else
|
|
||||||
blockIndex = index / this.blockSize;
|
|
||||||
subIndex = index % this.blockSize;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -309,11 +304,7 @@ namespace Nuclex.Support.Collections {
|
||||||
/// <param name="value">Value that will be checked for compatibility</param>
|
/// <param name="value">Value that will be checked for compatibility</param>
|
||||||
/// <returns>True if the value can be placed in the deque</returns>
|
/// <returns>True if the value can be placed in the deque</returns>
|
||||||
private static bool isCompatibleObject(object value) {
|
private static bool isCompatibleObject(object value) {
|
||||||
#if WINRT
|
|
||||||
return ((value is TItem) || ((value == null) && !typeof(TItem).GetTypeInfo().IsValueType));
|
|
||||||
#else
|
|
||||||
return ((value is TItem) || ((value == null) && !typeof(TItem).IsValueType));
|
return ((value is TItem) || ((value == null) && !typeof(TItem).IsValueType));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Verifies that the provided object matches the deque's type</summary>
|
/// <summary>Verifies that the provided object matches the deque's type</summary>
|
||||||
|
|
|
@ -37,11 +37,7 @@ namespace Nuclex.Support.Collections {
|
||||||
ISerializable,
|
ISerializable,
|
||||||
IDeserializationCallback,
|
IDeserializationCallback,
|
||||||
#endif
|
#endif
|
||||||
#if WINRT
|
|
||||||
ICollection,
|
|
||||||
#else
|
|
||||||
IDictionary,
|
IDictionary,
|
||||||
#endif
|
|
||||||
IDictionary<KeyType, ValueType> {
|
IDictionary<KeyType, ValueType> {
|
||||||
|
|
||||||
#if !NO_SERIALIZATION
|
#if !NO_SERIALIZATION
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace Nuclex.Support {
|
||||||
public abstract class ParallelBackgroundWorker<TTask> : IDisposable {
|
public abstract class ParallelBackgroundWorker<TTask> : IDisposable {
|
||||||
|
|
||||||
/// <summary>Number of CPU cores available on the system</summary>
|
/// <summary>Number of CPU cores available on the system</summary>
|
||||||
public static readonly int Processors = Environment.ProcessorCount;
|
public static readonly int ProcessorCount = Environment.ProcessorCount;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Timeout after which Dispose() will stop waiting for unfinished tasks and
|
/// Timeout after which Dispose() will stop waiting for unfinished tasks and
|
||||||
|
@ -61,7 +61,7 @@ namespace Nuclex.Support {
|
||||||
if(threadCount > 0) {
|
if(threadCount > 0) {
|
||||||
this.threadCount = threadCount;
|
this.threadCount = threadCount;
|
||||||
} else {
|
} else {
|
||||||
threadCount = Math.Max(1, Processors + threadCount);
|
threadCount = Math.Max(1, ProcessorCount + threadCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.queueSynchronizationRoot = new object();
|
this.queueSynchronizationRoot = new object();
|
||||||
|
|
|
@ -32,9 +32,7 @@ namespace Nuclex.Support {
|
||||||
/// <summary>Returns the global instance of the class</summary>
|
/// <summary>Returns the global instance of the class</summary>
|
||||||
public static TShared Instance {
|
public static TShared Instance {
|
||||||
[DebuggerStepThrough]
|
[DebuggerStepThrough]
|
||||||
get {
|
get { return instance; }
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Stored the globally shared instance</summary>
|
/// <summary>Stored the globally shared instance</summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user