Skip to content

Commit

Permalink
Register custom type converters with higher precedence than the builç…
Browse files Browse the repository at this point in the history
…d-in converters.
  • Loading branch information
aaubry committed Feb 29, 2016
1 parent f3bcdf1 commit a801dc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion YamlDotNet/Serialization/Deserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void RegisterTagMapping(string tag, Type type)

public void RegisterTypeConverter(IYamlTypeConverter typeConverter)
{
converters.Add(typeConverter);
converters.Insert(0, typeConverter);
}

public T Deserialize<T>(TextReader input)
Expand Down
2 changes: 1 addition & 1 deletion YamlDotNet/Serialization/Serializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private bool IsOptionSet(SerializationOptions option)
/// </summary>
public void RegisterTypeConverter(IYamlTypeConverter converter)
{
Converters.Add(converter);
Converters.Insert(0, converter);
}

/// <summary>
Expand Down

0 comments on commit a801dc5

Please sign in to comment.