From ce97e686826147e2a071fd2321555f7d40ec5d93 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Wed, 29 Apr 2015 15:27:14 +0100 Subject: Convert both the full and lite runtimes (and json/xml serialization assemblies) to be Portable Class Libraries. All referring projects are now .NET 4 client rather than .NET 3.5. This commit also fixes up the ProtoBench app, which I'd neglected in previous commits. (Disentangling the two sets of changes would be time-consuming.) --- csharp/src/ProtocolBuffers/FieldSet.cs | 8 ++++---- csharp/src/ProtocolBuffers/GeneratedMessage.cs | 4 ++-- csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs | 3 --- csharp/src/ProtocolBuffers/ProtocolBuffers.csproj | 17 +++++++++-------- csharp/src/ProtocolBuffers/ProtocolBuffersLite.csproj | 17 +++++++++-------- csharp/src/ProtocolBuffers/TextFormat.cs | 4 ---- csharp/src/ProtocolBuffers/UnknownFieldSet.cs | 4 ++-- 7 files changed, 26 insertions(+), 31 deletions(-) (limited to 'csharp/src/ProtocolBuffers') diff --git a/csharp/src/ProtocolBuffers/FieldSet.cs b/csharp/src/ProtocolBuffers/FieldSet.cs index f3c08cf5..4177400f 100644 --- a/csharp/src/ProtocolBuffers/FieldSet.cs +++ b/csharp/src/ProtocolBuffers/FieldSet.cs @@ -88,7 +88,7 @@ namespace Google.ProtocolBuffers public static FieldSet CreateInstance() { // Use SortedList to keep fields in the canonical order - return new FieldSet(new SortedList()); + return new FieldSet(new SortedDictionary()); } /// @@ -111,7 +111,7 @@ namespace Google.ProtocolBuffers if (hasRepeats) { - var tmp = new SortedList(); + var tmp = new SortedDictionary(); foreach (KeyValuePair entry in fields) { IList list = entry.Value as IList; @@ -151,8 +151,8 @@ namespace Google.ProtocolBuffers { get { - SortedList copy = - new SortedList(); + SortedDictionary copy = + new SortedDictionary(); foreach (KeyValuePair fd in fields) { copy.Add((FieldDescriptor) fd.Key, fd.Value); diff --git a/csharp/src/ProtocolBuffers/GeneratedMessage.cs b/csharp/src/ProtocolBuffers/GeneratedMessage.cs index 6f4b6657..c17c15cf 100644 --- a/csharp/src/ProtocolBuffers/GeneratedMessage.cs +++ b/csharp/src/ProtocolBuffers/GeneratedMessage.cs @@ -75,8 +75,8 @@ namespace Google.ProtocolBuffers internal IDictionary GetMutableFieldMap() { - // Use a SortedList so we'll end up serializing fields in order - var ret = new SortedList(); + // Use a SortedDictionary so we'll end up serializing fields in order + var ret = new SortedDictionary(); MessageDescriptor descriptor = DescriptorForType; foreach (FieldDescriptor field in descriptor.Fields) { diff --git a/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs b/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs index 063f6666..806bd5d5 100644 --- a/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs +++ b/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs @@ -65,6 +65,3 @@ using System.Security; [assembly: AssemblyFileVersion("2.4.1.555")] #endif -#if CLIENTPROFILE // ROK - not defined in SL, CF, or PL -[assembly: AllowPartiallyTrustedCallers] -#endif diff --git a/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj b/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj index 5f6404a2..32a343ad 100644 --- a/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj +++ b/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj @@ -1,8 +1,6 @@  - CLIENTPROFILE - NET35 Debug AnyCPU 9.0.30729 @@ -12,18 +10,21 @@ Properties Google.ProtocolBuffers Google.ProtocolBuffers - v3.5 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Profile92 + v4.0 512 true ..\..\keys\Google.ProtocolBuffers.snk 3.5 + 10.0 true full false - bin\NET35\Debug - obj\NET35\Debug\ + bin\Debug + obj\Debug\ $(OutputPath)\$(AssemblyName).xml 1591, 1570, 1571, 1572, 1573, 1574 DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate) @@ -35,8 +36,8 @@ pdbonly true - bin\NET35\Release - obj\NET35\Release\ + bin\Release + obj\Release\ $(OutputPath)\$(AssemblyName).xml 1591, 1570, 1571, 1572, 1573, 1574 TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate) @@ -137,7 +138,7 @@ - +