Pārlūkot izejas kodu

Renamed SILVERLIGHT2 compilation constant to SILVERLIGHT

csharptest 14 gadi atpakaļ
vecāks
revīzija
4ebef33289

+ 1 - 1
src/ProtocolBuffers.Serialization/JsonFormatWriter.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;

+ 2 - 2
src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj

@@ -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>

+ 2 - 2
src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj

@@ -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>

+ 2 - 2
src/ProtocolBuffers.Serialization/RecursionLimitExceeded.cs

@@ -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)
         {

+ 1 - 1
src/ProtocolBuffers/CodedInputStream.cs

@@ -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);

+ 1 - 1
src/ProtocolBuffers/CodedOutputStream.cs

@@ -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);

+ 1 - 1
src/ProtocolBuffers/CustomSerialization.cs

@@ -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
 {
     /* 

+ 1 - 1
src/ProtocolBuffers/EnumLite.cs

@@ -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))

+ 2 - 2
src/ProtocolBuffers/ProtocolBuffers.csproj

@@ -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>

+ 2 - 2
src/ProtocolBuffers/ProtocolBuffersLite.csproj

@@ -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>

+ 1 - 1
src/ProtocolBuffers/SilverlightCompatibility.cs

@@ -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;

+ 1 - 1
src/ProtocolBuffers/SortedList.cs

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