diff --git a/README.TXT b/README.TXT index cab8829..2f65c26 100644 --- a/README.TXT +++ b/README.TXT @@ -1,7 +1,3 @@ -# cBrain contribution guide - -There are currently 2 branches *master* and *dev*. The branch *dev* represents our synchronization with the original fork. As such changes which we expect to push back should be made in *dev* and subsequently merged to *master*. Changes which are purely internal, such as our own versioning, should be made in *master*. - ----------------------------------------------------------------- Ramone - A C# library for working with REST services and Web APIs ----------------------------------------------------------------- diff --git a/Ramone/MediaTypes/Xml/XmlSerializerCodec.cs b/Ramone/MediaTypes/Xml/XmlSerializerCodec.cs index 938d1fb..2dd5899 100644 --- a/Ramone/MediaTypes/Xml/XmlSerializerCodec.cs +++ b/Ramone/MediaTypes/Xml/XmlSerializerCodec.cs @@ -2,7 +2,7 @@ using System.Xml.Serialization; using System; using System.Collections.Generic; - +using System.Collections.Concurrent; namespace Ramone.MediaTypes.Xml { @@ -10,12 +10,12 @@ public class XmlSerializerCodec : XmlStreamCodecBase { // The XmlSerializer is thread safe according to the online docs, so it should be safe // to share instances. - static Dictionary Serializers { get; set; } + static ConcurrentDictionary Serializers { get; set; } static XmlSerializerCodec() { - Serializers = new Dictionary(); + Serializers = new ConcurrentDictionary(); } @@ -38,11 +38,7 @@ protected override void WriteTo(object item, XmlWriter writer, WriterContext con protected XmlSerializer GetSerializer(Type t) { - if (!Serializers.ContainsKey(t)) - { - Serializers[t] = CreateSerializer(t); - } - return Serializers[t]; + return Serializers.GetOrAdd(t, CreateSerializer); } diff --git a/Ramone/Ramone.csproj b/Ramone/Ramone.csproj index a2791c6..f195cc8 100644 --- a/Ramone/Ramone.csproj +++ b/Ramone/Ramone.csproj @@ -8,14 +8,14 @@ - + MIT - https://github.com/cBrain-dk/Ramone/ - https://github.com/cBrain-dk/Ramone/ + https://github.com/JornWildt/Ramone + https://github.com/JornWildt/Ramone.git GIT REST JSON XML HTTP WEB API - 4.1.5.2-cbrain + 4.1.5.0 Jørn Wildt and others Jørn Wildt Ramone is a C# library that simplifies access to HTTP based Web APIs and REST services. It has a strong focus on REST and hypermedia and implements elements of the Uniform Interface as first class citizens of the API. @@ -23,9 +23,9 @@ Ramone has built-in support for serialization of simple objects as JSON, XML, URL-encoding and multipart encoding. Copyright ©2010, Ramone team - Use System.Net.Http.Headers.AuthenticationHeaderValue to parse authentication header. - 4.1.5.2 - 4.1.5.2 + Rebuild with the right code - was missing code from previous versions. + 4.1.5.0 + 4.1.5.0 @@ -38,4 +38,4 @@ Ramone has built-in support for serialization of simple objects as JSON, XML, UR - + \ No newline at end of file