From 6053f5a87794f6f13f673ac719f2d44d97f7b688 Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Tue, 19 Aug 2014 11:32:56 +0000 Subject: [PATCH] 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 --- Source/Collections/Deque.cs | 9 --------- Source/Collections/ReadOnlyDictionary.cs | 4 ---- Source/ParallelBackgroundWorker.cs | 4 ++-- Source/Shared.cs | 4 +--- 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/Source/Collections/Deque.cs b/Source/Collections/Deque.cs index add18c0..474702b 100644 --- a/Source/Collections/Deque.cs +++ b/Source/Collections/Deque.cs @@ -295,12 +295,7 @@ namespace Nuclex.Support.Collections { } index += this.firstBlockStartIndex; -#if WINDOWS blockIndex = Math.DivRem(index, this.blockSize, out subIndex); -#else - blockIndex = index / this.blockSize; - subIndex = index % this.blockSize; -#endif } /// @@ -309,11 +304,7 @@ namespace Nuclex.Support.Collections { /// Value that will be checked for compatibility /// True if the value can be placed in the deque 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)); -#endif } /// Verifies that the provided object matches the deque's type diff --git a/Source/Collections/ReadOnlyDictionary.cs b/Source/Collections/ReadOnlyDictionary.cs index ecd8ff6..e56154f 100644 --- a/Source/Collections/ReadOnlyDictionary.cs +++ b/Source/Collections/ReadOnlyDictionary.cs @@ -37,11 +37,7 @@ namespace Nuclex.Support.Collections { ISerializable, IDeserializationCallback, #endif -#if WINRT - ICollection, -#else IDictionary, -#endif IDictionary { #if !NO_SERIALIZATION diff --git a/Source/ParallelBackgroundWorker.cs b/Source/ParallelBackgroundWorker.cs index 73d2e7e..cc7de92 100644 --- a/Source/ParallelBackgroundWorker.cs +++ b/Source/ParallelBackgroundWorker.cs @@ -33,7 +33,7 @@ namespace Nuclex.Support { public abstract class ParallelBackgroundWorker : IDisposable { /// Number of CPU cores available on the system - public static readonly int Processors = Environment.ProcessorCount; + public static readonly int ProcessorCount = Environment.ProcessorCount; /// /// Timeout after which Dispose() will stop waiting for unfinished tasks and @@ -61,7 +61,7 @@ namespace Nuclex.Support { if(threadCount > 0) { this.threadCount = threadCount; } else { - threadCount = Math.Max(1, Processors + threadCount); + threadCount = Math.Max(1, ProcessorCount + threadCount); } this.queueSynchronizationRoot = new object(); diff --git a/Source/Shared.cs b/Source/Shared.cs index cfd4ec9..891a14f 100644 --- a/Source/Shared.cs +++ b/Source/Shared.cs @@ -32,9 +32,7 @@ namespace Nuclex.Support { /// Returns the global instance of the class public static TShared Instance { [DebuggerStepThrough] - get { - return instance; - } + get { return instance; } } /// Stored the globally shared instance