diff options
author | csharptest <roger@csharptest.net> | 2012-10-14 15:12:29 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2012-10-14 15:12:29 -0500 |
commit | 945bd1d516d94389a1f3d4b29e754fcd345ce955 (patch) | |
tree | 5d6e818790c44b54a6c1a68a649ed0c817b25ddc /src/ProtocolBuffers | |
parent | 5cda54bd8b7269cf8f48ff7af28acfd4783c5a45 (diff) | |
download | protobuf-945bd1d516d94389a1f3d4b29e754fcd345ce955.tar.gz protobuf-945bd1d516d94389a1f3d4b29e754fcd345ce955.tar.bz2 protobuf-945bd1d516d94389a1f3d4b29e754fcd345ce955.zip |
Working to reduce number of conditional complication directives, and migrate towards feature-based condtions rather than platform-based
Diffstat (limited to 'src/ProtocolBuffers')
-rw-r--r-- | src/ProtocolBuffers/CustomSerialization.cs | 2 | ||||
-rw-r--r-- | src/ProtocolBuffers/FieldAccess/ReflectionUtil.cs | 3 | ||||
-rw-r--r-- | src/ProtocolBuffers/FrameworkPortability.cs | 2 | ||||
-rw-r--r-- | src/ProtocolBuffers/SortedList.cs | 4 | ||||
-rw-r--r-- | src/ProtocolBuffers/ThrowHelper.cs | 4 |
5 files changed, 4 insertions, 11 deletions
diff --git a/src/ProtocolBuffers/CustomSerialization.cs b/src/ProtocolBuffers/CustomSerialization.cs index 256f2e67..a1aee029 100644 --- a/src/ProtocolBuffers/CustomSerialization.cs +++ b/src/ProtocolBuffers/CustomSerialization.cs @@ -36,7 +36,7 @@ /*
* This entire source file is not supported on the Silverlight platform
*/
-#if !SILVERLIGHT && !COMPACT_FRAMEWORK
+#if !NOSERIALIZABLE
using System;
using System.Runtime.Serialization;
diff --git a/src/ProtocolBuffers/FieldAccess/ReflectionUtil.cs b/src/ProtocolBuffers/FieldAccess/ReflectionUtil.cs index d2b6c51f..24f7fba9 100644 --- a/src/ProtocolBuffers/FieldAccess/ReflectionUtil.cs +++ b/src/ProtocolBuffers/FieldAccess/ReflectionUtil.cs @@ -63,8 +63,7 @@ namespace Google.ProtocolBuffers.FieldAccess /// <summary>
/// Method used solely for implementing CreateUpcastDelegate. Public to avoid trust issues
- /// in low-trust scenarios, e.g. Silverlight.
- /// TODO(jonskeet): Check any of this actually works in Silverlight...
+ /// in low-trust scenarios.
/// </summary>
public static Func<TSource, object> CreateUpcastDelegateImpl<TSource, TResult>(MethodInfo method)
{
diff --git a/src/ProtocolBuffers/FrameworkPortability.cs b/src/ProtocolBuffers/FrameworkPortability.cs index 774d5625..78b7db31 100644 --- a/src/ProtocolBuffers/FrameworkPortability.cs +++ b/src/ProtocolBuffers/FrameworkPortability.cs @@ -42,7 +42,7 @@ using System.Text.RegularExpressions; namespace Google.ProtocolBuffers
{
/// <summary>
- /// Class containing helpful workarounds for Silverlight compatibility
+ /// Class containing helpful workarounds for various platform compatibility
/// </summary>
internal static class FrameworkPortability
{
diff --git a/src/ProtocolBuffers/SortedList.cs b/src/ProtocolBuffers/SortedList.cs index 4dcf9282..2dd7da92 100644 --- a/src/ProtocolBuffers/SortedList.cs +++ b/src/ProtocolBuffers/SortedList.cs @@ -34,7 +34,7 @@ #endregion
-#if SILVERLIGHT
+#if NOSORTEDLIST
using System.Collections;
using System.Collections.Generic;
@@ -45,8 +45,6 @@ namespace Google.ProtocolBuffers /// This is not particularly efficient: it wraps a normal dictionary
/// for most operations, but sorts by key when either iterating or
/// fetching the Keys/Values properties.
- /// This is only used for Silverlight, which doesn't have the normal
- /// sorted collections.
/// </summary>
internal sealed class SortedList<TKey, TValue> : IDictionary<TKey, TValue>
{
diff --git a/src/ProtocolBuffers/ThrowHelper.cs b/src/ProtocolBuffers/ThrowHelper.cs index 22584dd0..34b3f653 100644 --- a/src/ProtocolBuffers/ThrowHelper.cs +++ b/src/ProtocolBuffers/ThrowHelper.cs @@ -82,11 +82,7 @@ namespace Google.ProtocolBuffers public static Exception CreateMissingMethod(Type type, string methodName)
{
-#if SILVERLIGHT || COMPACT_FRAMEWORK
return new MissingMethodException(String.Format("The method '{0}' was not found on type {1}", methodName, type));
-#else
- return new MissingMethodException(String.Format("{0}", type), methodName);
-#endif
}
}
}
\ No newline at end of file |