From b1b1f02e6fdd59bbc927cbca7815811a4e55c5dd Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Tue, 22 Jul 2014 08:50:05 +0000 Subject: [PATCH] Removed the last traces of Windows Phone 7 and Xbox 360 support git-svn-id: file:///srv/devel/repo-conversion/nusu@314 d2e56fa2-650e-0410-a79f-9358c0239efd --- Nuclex.Support (xna-4.0-phone7).csproj | 374 ----------------------- Nuclex.Support (xna-4.0-xbox360).csproj | 385 ------------------------ Source/EnumHelper.Test.cs | 25 -- Source/EnumHelper.cs | 32 -- Source/Settings/WindowsRegistryStore.cs | 6 + 5 files changed, 6 insertions(+), 816 deletions(-) delete mode 100644 Nuclex.Support (xna-4.0-phone7).csproj delete mode 100644 Nuclex.Support (xna-4.0-xbox360).csproj diff --git a/Nuclex.Support (xna-4.0-phone7).csproj b/Nuclex.Support (xna-4.0-phone7).csproj deleted file mode 100644 index b14999e..0000000 --- a/Nuclex.Support (xna-4.0-phone7).csproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - {7AC614A7-E1FC-4EB9-9229-13B26280FF9B} - {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - Windows Phone - Library - Properties - Nuclex.Support - Nuclex.Support - v4.0 - Client - v4.0 - Windows Phone - Reach - ab7fffb0-8ac5-44fe-b113-2d14c58c5804 - Library - - - true - full - false - bin\xna-4.0-phone7\Debug\ - TRACE;DEBUG;WINDOWS_PHONE;NO_CLONING;NO_SERIALIZATION;NO_XMLSCHEMA;NO_SYSTEMEVENTS;NO_EXITCONTEXT;NO_SPECIALIZED_COLLECTIONS;NO_CONCURRENT_COLLECTIONS - prompt - 4 - true - false - false - bin\xna-4.0-phone7\Debug\Nuclex.Support.xml - - - pdbonly - true - bin\xna-4.0-phone7\Release\ - TRACE;WINDOWS_PHONE;NO_CLONING;NO_SERIALIZATION;NO_XMLSCHEMA;NO_SYSTEMEVENTS;NO_EXITCONTEXT;NO_SPECIALIZED_COLLECTIONS;NO_CONCURRENT_COLLECTIONS - prompt - 4 - true - false - false - bin\xna-4.0-phone7\Release\Nuclex.Support.xml - - - true - - - ..\Foundation.snk - - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - 4.0 - False - - - 4.0 - False - - - False - - - - - - - - ExpressionTreeCloner.cs - - - ExpressionTreeCloner.cs - - - ExpressionTreeCloner.cs - - - - - ReflectionCloner.cs - - - - - SerializationCloner.cs - - - - Constants.cs - - - - Deque.cs - - - Deque.cs - - - Deque.cs - - - Deque.cs - - - Deque.cs - - - - - - - ItemEventArgs.cs - - - - ItemReplaceEventArgs.cs - - - - MultiDictionary.cs - - - MultiDictionary.cs - - - MultiDictionary.cs - - - - ObservableCollection.cs - - - - ObservableDictionary.cs - - - - ObservableList.cs - - - - ObservableSet.cs - - - - PairPriorityQueue.cs - - - - Parentable.cs - - - - ParentingCollection.cs - - - - Pool.cs - - - - PriorityItemPair.cs - - - - PriorityQueue.cs - - - - ReadOnlyCollection.cs - - - - ReadOnlyDictionary.cs - - - - ReadOnlyList.cs - - - - ReadOnlySet.cs - - - - ReverseComparer.cs - - - - TransformingReadOnlyCollection.cs - - - TransformingReadOnlyCollection.cs - - - - Variegator.cs - - - - WeakCollection.cs - - - WeakCollection.cs - - - - ConfigurationFileStore.cs - - - ConfigurationFileStore.cs - - - - - MemoryStore.cs - - - - - WindowsRegistryStore.cs - - - - - PartialStream.cs - - - - RingMemoryStream.cs - - - - ChainStream.cs - - - - LicenseKey.cs - - - - CommandLine.cs - - - CommandLine.cs - - - CommandLine.cs - - - CommandLine.cs - - - - ParallelBackgroundWorker.cs - - - - ParserHelper.cs - - - - PropertyChangedEventArgsHelper.cs - - - - AffineThreadPool.cs - - - - EnumHelper.cs - - - - Observable.cs - - - - ObservableHelper.cs - - - - TypeHelper.cs - - - - Semaphore.cs - - - - FloatHelper.cs - - - - IntegerHelper.cs - - - - PathHelper.cs - - - - Shared.cs - - - - StringBuilderHelper.cs - - - - StringHelper.cs - - - - StringSegment.cs - - - - WeakReference.cs - - - WeakReference.cs - - - - XmlHelper.cs - - - - - Foundation.snk - - - - - - - - - - - \ No newline at end of file diff --git a/Nuclex.Support (xna-4.0-xbox360).csproj b/Nuclex.Support (xna-4.0-xbox360).csproj deleted file mode 100644 index e0a1456..0000000 --- a/Nuclex.Support (xna-4.0-xbox360).csproj +++ /dev/null @@ -1,385 +0,0 @@ - - - - {DCB169D9-417F-4FF1-848A-B00CF7C88B31} - {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - Xbox 360 - Library - Properties - Nuclex.Support - Nuclex.Support - v4.0 - Client - v4.0 - Xbox 360 - HiDef - 228353e9-b10a-4191-b7a5-f7c152bfb818 - Library - - - true - full - false - bin\xna-4.0-xbox360\Debug\ - TRACE;DEBUG;XBOX;XBOX360;NO_CLONING;NO_SERIALIZATION;NO_XMLSCHEMA;NO_SYSTEMEVENTS;NO_EXITCONTEXT;NO_SPECIALIZED_COLLECTIONS;NO_LINQ_EXPRESSIONS;NO_CONCURRENT_COLLECTIONS - prompt - 4 - true - false - true - bin\xna-4.0-xbox360\Debug\Nuclex.Support.xml - - - pdbonly - true - bin\xna-4.0-xbox360\Release\ - TRACE;XBOX;XBOX360;NO_CLONING;NO_SERIALIZATION;NO_XMLSCHEMA;NO_SYSTEMEVENTS;NO_EXITCONTEXT;NO_SPECIALIZED_COLLECTIONS;NO_LINQ_EXPRESSIONS;NO_CONCURRENT_COLLECTIONS - prompt - 4 - true - false - true - bin\xna-4.0-xbox360\Release\Nuclex.Support.xml - - - true - - - ..\Foundation.snk - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - 4.0 - False - - - 4.0 - False - - - False - - - - - - - - ExpressionTreeCloner.cs - - - ExpressionTreeCloner.cs - - - ExpressionTreeCloner.cs - - - - - ReflectionCloner.cs - - - - - SerializationCloner.cs - - - - Constants.cs - - - - Deque.cs - - - Deque.cs - - - Deque.cs - - - Deque.cs - - - Deque.cs - - - - - - - ItemEventArgs.cs - - - - ItemReplaceEventArgs.cs - - - - MultiDictionary.cs - - - MultiDictionary.cs - - - MultiDictionary.cs - - - - ObservableCollection.cs - - - - ObservableDictionary.cs - - - - ObservableList.cs - - - - ObservableSet.cs - - - - PairPriorityQueue.cs - - - - Parentable.cs - - - - ParentingCollection.cs - - - - Pool.cs - - - - PriorityItemPair.cs - - - - PriorityQueue.cs - - - - ReadOnlyCollection.cs - - - - ReadOnlyDictionary.cs - - - - ReadOnlyList.cs - - - - ReadOnlySet.cs - - - - ReverseComparer.cs - - - - TransformingReadOnlyCollection.cs - - - TransformingReadOnlyCollection.cs - - - - Variegator.cs - - - - WeakCollection.cs - - - WeakCollection.cs - - - - ConfigurationFileStore.cs - - - ConfigurationFileStore.cs - - - - - MemoryStore.cs - - - - - WindowsRegistryStore.cs - - - - - PartialStream.cs - - - - RingMemoryStream.cs - - - - ChainStream.cs - - - - LicenseKey.cs - - - - CommandLine.cs - - - CommandLine.cs - - - CommandLine.cs - - - CommandLine.cs - - - - ParallelBackgroundWorker.cs - - - - ParserHelper.cs - - - - PropertyChangedEventArgsHelper.cs - - - - AffineThreadPool.cs - - - - EnumHelper.cs - - - - Observable.cs - - - - ObservableHelper.cs - - - - TypeHelper.cs - - - - Semaphore.cs - - - - FloatHelper.cs - - - - IntegerHelper.cs - - - - PathHelper.cs - - - - Shared.cs - - - - StringBuilderHelper.cs - - - - StringHelper.cs - - - - StringSegment.cs - - - - WeakReference.cs - - - WeakReference.cs - - - - XmlHelper.cs - - - - - Foundation.snk - - - - - - - - - - - \ No newline at end of file diff --git a/Source/EnumHelper.Test.cs b/Source/EnumHelper.Test.cs index f2d2368..43ec28a 100644 --- a/Source/EnumHelper.Test.cs +++ b/Source/EnumHelper.Test.cs @@ -51,20 +51,6 @@ namespace Nuclex.Support { #endregion // enum EmptyEnumeration - /// - /// Verifies that the enum helper can list the members of an enumeration - /// manually (as it needs to be done on the XBox 360) - /// - [Test] - public void TestGetValuesXbox360() { - CollectionAssert.AreEquivalent( - new TestEnumeration[] { - TestEnumeration.One, TestEnumeration.Two, TestEnumeration.Three - }, - EnumHelper.GetValuesXbox360() - ); - } - /// /// Verifies that the enum helper can list the members of an enumeration /// @@ -98,17 +84,6 @@ namespace Nuclex.Support { ); } - /// - /// Tests whether an exception is thrown if the GetValuesXbox360() method is - /// used on a non-enumeration type - /// - [Test] - public void TestThrowOnNonEnumTypeXbox360() { - Assert.Throws( - delegate() { EnumHelper.GetValuesXbox360(); } - ); - } - /// /// Tests whether an exception is thrown if the GetValues() method is used on /// a non-enumeration type diff --git a/Source/EnumHelper.cs b/Source/EnumHelper.cs index f5e47a3..b9fdbf4 100644 --- a/Source/EnumHelper.cs +++ b/Source/EnumHelper.cs @@ -92,39 +92,7 @@ namespace Nuclex.Support { /// and cache the result. /// public static TEnum[] GetValues() { -#if XBOX360 || WINDOWS_PHONE - return GetValuesXbox360(); -#else return (TEnum[])Enum.GetValues(typeof(TEnum)); -#endif - } - - /// Retrieves a list of all values contained in an enumeration - /// - /// Type of the enumeration whose values will be returned - /// - /// All values contained in the specified enumeration - internal static TEnum[] GetValuesXbox360() { - Type enumType = typeof(TEnum); - if(!enumType.IsEnum) { - throw new ArgumentException( - "The provided type needs to be an enumeration", "EnumType" - ); - } - - // Use reflection to get all fields in the enumeration - FieldInfo[] fieldInfos = enumType.GetFields( - BindingFlags.Public | BindingFlags.Static - ); - - // Create an array to hold the enumeration values and copy them over from - // the fields we just retrieved - TEnum[] values = new TEnum[fieldInfos.Length]; - for(int index = 0; index < fieldInfos.Length; ++index) { - values[index] = (TEnum)fieldInfos[index].GetValue(null); - } - - return values; } } diff --git a/Source/Settings/WindowsRegistryStore.cs b/Source/Settings/WindowsRegistryStore.cs index f1bf7f8..33def6b 100644 --- a/Source/Settings/WindowsRegistryStore.cs +++ b/Source/Settings/WindowsRegistryStore.cs @@ -18,6 +18,8 @@ License along with this library */ #endregion +#if WINDOWS + using System; using System.Collections.Generic; @@ -26,6 +28,8 @@ namespace Nuclex.Support.Settings { /// Stores settings in the registry on Windows operating systems public class WindowsRegistryStore : ISettingsStore, IDisposable { + + /// Immediately releases all resources owned by the instance public void Dispose() { } @@ -99,3 +103,5 @@ namespace Nuclex.Support.Settings { } } // namespace Nuclex.Support.Settings + +#endif // WINDOWS