Commit 4ebef332 authored by csharptest's avatar csharptest Committed by rogerk

Renamed SILVERLIGHT2 compilation constant to SILVERLIGHT

parent d444748e
...@@ -100,7 +100,7 @@ namespace Google.ProtocolBuffers.Serialization ...@@ -100,7 +100,7 @@ namespace Google.ProtocolBuffers.Serialization
private class JsonStreamWriter : JsonFormatWriter private class JsonStreamWriter : JsonFormatWriter
{ {
#if SILVERLIGHT2 || COMPACT_FRAMEWORK_35 #if SILVERLIGHT || COMPACT_FRAMEWORK_35
static readonly Encoding Encoding = new UTF8Encoding(false); static readonly Encoding Encoding = new UTF8Encoding(false);
#else #else
private static readonly Encoding Encoding = Encoding.ASCII; private static readonly Encoding Encoding = Encoding.ASCII;
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath> <OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT2</DefineConstants> <DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath> <OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT2</DefineConstants> <DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath> <OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT2</DefineConstants> <DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath> <OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT2</DefineConstants> <DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
......
...@@ -7,7 +7,7 @@ namespace Google.ProtocolBuffers.Serialization ...@@ -7,7 +7,7 @@ namespace Google.ProtocolBuffers.Serialization
/// <summary> /// <summary>
/// The exception raised when a recursion limit is reached while parsing input. /// The exception raised when a recursion limit is reached while parsing input.
/// </summary> /// </summary>
#if !SILVERLIGHT2 #if !SILVERLIGHT
[Serializable] [Serializable]
#endif #endif
public sealed class RecursionLimitExceededException : FormatException public sealed class RecursionLimitExceededException : FormatException
...@@ -18,7 +18,7 @@ namespace Google.ProtocolBuffers.Serialization ...@@ -18,7 +18,7 @@ namespace Google.ProtocolBuffers.Serialization
{ {
} }
#if !SILVERLIGHT2 #if !SILVERLIGHT
private RecursionLimitExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) private RecursionLimitExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context) : base(info, context)
{ {
......
...@@ -231,7 +231,7 @@ namespace Google.ProtocolBuffers ...@@ -231,7 +231,7 @@ namespace Google.ProtocolBuffers
/// </summary> /// </summary>
public bool ReadDouble(ref double value) public bool ReadDouble(ref double value)
{ {
#if SILVERLIGHT2 || COMPACT_FRAMEWORK_35 #if SILVERLIGHT || COMPACT_FRAMEWORK_35
if (BitConverter.IsLittleEndian && 8 <= bufferSize - bufferPos) if (BitConverter.IsLittleEndian && 8 <= bufferSize - bufferPos)
{ {
value = BitConverter.ToDouble(buffer, bufferPos); value = BitConverter.ToDouble(buffer, bufferPos);
......
...@@ -496,7 +496,7 @@ namespace Google.ProtocolBuffers ...@@ -496,7 +496,7 @@ namespace Google.ProtocolBuffers
/// </summary> /// </summary>
public void WriteDoubleNoTag(double value) public void WriteDoubleNoTag(double value)
{ {
#if SILVERLIGHT2 || COMPACT_FRAMEWORK_35 #if SILVERLIGHT || COMPACT_FRAMEWORK_35
byte[] rawBytes = BitConverter.GetBytes(value); byte[] rawBytes = BitConverter.GetBytes(value);
if (!BitConverter.IsLittleEndian) if (!BitConverter.IsLittleEndian)
ByteArray.Reverse(rawBytes); ByteArray.Reverse(rawBytes);
......
...@@ -40,7 +40,7 @@ using System.Runtime.Serialization; ...@@ -40,7 +40,7 @@ using System.Runtime.Serialization;
/* /*
* This entire source file is not supported on the Silverlight platform * This entire source file is not supported on the Silverlight platform
*/ */
#if !SILVERLIGHT2 #if !SILVERLIGHT
namespace Google.ProtocolBuffers namespace Google.ProtocolBuffers
{ {
/* /*
......
...@@ -98,7 +98,7 @@ namespace Google.ProtocolBuffers ...@@ -98,7 +98,7 @@ namespace Google.ProtocolBuffers
public EnumLiteMap() public EnumLiteMap()
{ {
items = new SortedList<int, IEnumLite>(); items = new SortedList<int, IEnumLite>();
#if SILVERLIGHT2 #if SILVERLIGHT
// Silverlight doesn't support Enum.GetValues // Silverlight doesn't support Enum.GetValues
// TODO(jonskeet): Validate that this reflection is permitted, e.g. in Windows Phone 7 // TODO(jonskeet): Validate that this reflection is permitted, e.g. in Windows Phone 7
foreach (System.Reflection.FieldInfo fi in typeof(TEnum).GetFields(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public)) foreach (System.Reflection.FieldInfo fi in typeof(TEnum).GetFields(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public))
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath> <OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT2</DefineConstants> <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath> <OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;SILVERLIGHT2</DefineConstants> <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath> <OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT2;LITE</DefineConstants> <DefineConstants>DEBUG;TRACE;SILVERLIGHT;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath> <OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn> <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;SILVERLIGHT2;LITE</DefineConstants> <DefineConstants>TRACE;SILVERLIGHT;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
......
...@@ -43,7 +43,7 @@ namespace Google.ProtocolBuffers ...@@ -43,7 +43,7 @@ namespace Google.ProtocolBuffers
/// </summary> /// </summary>
internal static class SilverlightCompatibility internal static class SilverlightCompatibility
{ {
#if SILVERLIGHT2 #if SILVERLIGHT
internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.None; internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.None;
#else #else
internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.Compiled; internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.Compiled;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#endregion #endregion
#if SILVERLIGHT2 #if SILVERLIGHT
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment