Skip to content

Commit

Permalink
Merge pull request #61 from cBrain-dk/pull-request-fix
Browse files Browse the repository at this point in the history
Fix merge problems
  • Loading branch information
JornWildt authored Mar 18, 2024
2 parents 3815eda + 7806d2d commit ee1a568
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
4 changes: 0 additions & 4 deletions README.TXT
Original file line number Diff line number Diff line change
@@ -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
-----------------------------------------------------------------
Expand Down
12 changes: 4 additions & 8 deletions Ramone/MediaTypes/Xml/XmlSerializerCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
using System.Xml.Serialization;
using System;
using System.Collections.Generic;

using System.Collections.Concurrent;

namespace Ramone.MediaTypes.Xml
{
public class XmlSerializerCodec : XmlStreamCodecBase
{
// The XmlSerializer is thread safe according to the online docs, so it should be safe
// to share instances.
static Dictionary<Type, XmlSerializer> Serializers { get; set; }
static ConcurrentDictionary<Type, XmlSerializer> Serializers { get; set; }


static XmlSerializerCodec()
{
Serializers = new Dictionary<Type, XmlSerializer>();
Serializers = new ConcurrentDictionary<Type, XmlSerializer>();
}


Expand All @@ -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);
}


Expand Down
16 changes: 8 additions & 8 deletions Ramone/Ramone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
<Reference Include="System.Web" />
<Reference Include="System.Net.Http" />
</ItemGroup>

<PropertyGroup>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/cBrain-dk/Ramone/</PackageProjectUrl>
<RepositoryUrl>https://github.com/cBrain-dk/Ramone/</RepositoryUrl>
<PackageProjectUrl>https://github.com/JornWildt/Ramone</PackageProjectUrl>
<RepositoryUrl>https://github.com/JornWildt/Ramone.git</RepositoryUrl>
<RepositoryType>GIT</RepositoryType>
<PackageTags>REST JSON XML HTTP WEB API</PackageTags>
<Version>4.1.5.2-cbrain</Version>
<Version>4.1.5.0</Version>
<Authors>Jørn Wildt and others</Authors>
<Company>Jørn Wildt</Company>
<Description>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.

Ramone has built-in support for serialization of simple objects as JSON, XML, URL-encoding and multipart encoding.</Description>
<Copyright>Copyright ©2010, Ramone team</Copyright>
<Product />
<PackageReleaseNotes>Use System.Net.Http.Headers.AuthenticationHeaderValue to parse authentication header.</PackageReleaseNotes>
<AssemblyVersion>4.1.5.2</AssemblyVersion>
<FileVersion>4.1.5.2</FileVersion>
<PackageReleaseNotes>Rebuild with the right code - was missing code from previous versions.</PackageReleaseNotes>
<AssemblyVersion>4.1.5.0</AssemblyVersion>
<FileVersion>4.1.5.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -38,4 +38,4 @@ Ramone has built-in support for serialization of simple objects as JSON, XML, UR
<Folder Include="Properties\" />
</ItemGroup>

</Project>
</Project>

0 comments on commit ee1a568

Please sign in to comment.