Renamed SILVERLIGHT2 compilation constant to SILVERLIGHT

pull/288/head
csharptest 14 years ago committed by rogerk
parent d444748edc
commit 4ebef33289
  1. 2
      src/ProtocolBuffers.Serialization/JsonFormatWriter.cs
  2. 4
      src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj
  3. 4
      src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj
  4. 4
      src/ProtocolBuffers.Serialization/RecursionLimitExceeded.cs
  5. 2
      src/ProtocolBuffers/CodedInputStream.cs
  6. 2
      src/ProtocolBuffers/CodedOutputStream.cs
  7. 2
      src/ProtocolBuffers/CustomSerialization.cs
  8. 2
      src/ProtocolBuffers/EnumLite.cs
  9. 4
      src/ProtocolBuffers/ProtocolBuffers.csproj
  10. 4
      src/ProtocolBuffers/ProtocolBuffersLite.csproj
  11. 2
      src/ProtocolBuffers/SilverlightCompatibility.cs
  12. 2
      src/ProtocolBuffers/SortedList.cs

@ -100,7 +100,7 @@ namespace Google.ProtocolBuffers.Serialization
private class JsonStreamWriter : JsonFormatWriter
{
#if SILVERLIGHT2 || COMPACT_FRAMEWORK_35
#if SILVERLIGHT || COMPACT_FRAMEWORK_35
static readonly Encoding Encoding = new UTF8Encoding(false);
#else
private static readonly Encoding Encoding = Encoding.ASCII;

@ -69,7 +69,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT2</DefineConstants>
<DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
@ -81,7 +81,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT2</DefineConstants>
<DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>

@ -69,7 +69,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT2</DefineConstants>
<DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
@ -81,7 +81,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT2</DefineConstants>
<DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>

@ -7,7 +7,7 @@ namespace Google.ProtocolBuffers.Serialization
/// <summary>
/// The exception raised when a recursion limit is reached while parsing input.
/// </summary>
#if !SILVERLIGHT2
#if !SILVERLIGHT
[Serializable]
#endif
public sealed class RecursionLimitExceededException : FormatException
@ -18,7 +18,7 @@ namespace Google.ProtocolBuffers.Serialization
{
}
#if !SILVERLIGHT2
#if !SILVERLIGHT
private RecursionLimitExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{

@ -231,7 +231,7 @@ namespace Google.ProtocolBuffers
/// </summary>
public bool ReadDouble(ref double value)
{
#if SILVERLIGHT2 || COMPACT_FRAMEWORK_35
#if SILVERLIGHT || COMPACT_FRAMEWORK_35
if (BitConverter.IsLittleEndian && 8 <= bufferSize - bufferPos)
{
value = BitConverter.ToDouble(buffer, bufferPos);

@ -496,7 +496,7 @@ namespace Google.ProtocolBuffers
/// </summary>
public void WriteDoubleNoTag(double value)
{
#if SILVERLIGHT2 || COMPACT_FRAMEWORK_35
#if SILVERLIGHT || COMPACT_FRAMEWORK_35
byte[] rawBytes = BitConverter.GetBytes(value);
if (!BitConverter.IsLittleEndian)
ByteArray.Reverse(rawBytes);

@ -40,7 +40,7 @@ using System.Runtime.Serialization;
/*
* This entire source file is not supported on the Silverlight platform
*/
#if !SILVERLIGHT2
#if !SILVERLIGHT
namespace Google.ProtocolBuffers
{
/*

@ -98,7 +98,7 @@ namespace Google.ProtocolBuffers
public EnumLiteMap()
{
items = new SortedList<int, IEnumLite>();
#if SILVERLIGHT2
#if SILVERLIGHT
// Silverlight doesn't support Enum.GetValues
// 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))

@ -68,7 +68,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT2</DefineConstants>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
@ -80,7 +80,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;SILVERLIGHT2</DefineConstants>
<DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>

@ -50,7 +50,7 @@
<OutputPath>bin\Debug_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT2;LITE</DefineConstants>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
@ -62,7 +62,7 @@
<OutputPath>bin\Release_Silverlight\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;SILVERLIGHT2;LITE</DefineConstants>
<DefineConstants>TRACE;SILVERLIGHT;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>

@ -43,7 +43,7 @@ namespace Google.ProtocolBuffers
/// </summary>
internal static class SilverlightCompatibility
{
#if SILVERLIGHT2
#if SILVERLIGHT
internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.None;
#else
internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.Compiled;

@ -34,7 +34,7 @@
#endregion
#if SILVERLIGHT2
#if SILVERLIGHT
using System.Collections;
using System.Collections.Generic;

Loading…
Cancel
Save