Skip to content

Commit

Permalink
Minor Serialisation Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nrmontagne committed Jul 3, 2023
1 parent 6d8c7f5 commit dfb84de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion BRIDGES.ConsoleApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System;


namespace BRIDGES.ConsoleApp
{
Expand Down
4 changes: 2 additions & 2 deletions BRIDGES/Serialisation/Deserialise.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static T Object<T>(string text, Formats.ObjectFormat format)
}
else
{
MethodInfo serialiser = FindDeserialiserMethod(serialisedType);
MethodInfo serialiser = FindDeserialiser(serialisedType);

if (serialiser is null) { throw new MissingMethodException("The object is marked as serialisable but the serialiser method could not be found."); }
else
Expand All @@ -52,7 +52,7 @@ public static T Object<T>(string text, Formats.ObjectFormat format)
/// </summary>
/// <param name="deserialisableType"> Type whose deserialiser method is being searched. </param>
/// <returns> The method metadata if it exists, <see langword="null"/> otherwise. </returns>
private static MethodInfo FindDeserialiserMethod(Type deserialisableType)
private static MethodInfo FindDeserialiser(Type deserialisableType)
{
// Go through the public methods of the Deserialise class
Type deserialiserClassType = typeof(Deserialise);
Expand Down
4 changes: 2 additions & 2 deletions BRIDGES/Serialisation/Serialise.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static string Object(object obj, Formats.ObjectFormat format)
}
else
{
MethodInfo serialiser = FindSerialiserMethod(serialisedType);
MethodInfo serialiser = FindSerialiser(serialisedType);

if (serialiser is null) { throw new MissingMethodException("The object is marked as serialisable but the serialiser method could not be found."); }
else
Expand All @@ -54,7 +54,7 @@ public static string Object(object obj, Formats.ObjectFormat format)
/// </summary>
/// <param name="serialisableType"> Type whose serialiser method is being searched. </param>
/// <returns> The method metadata if it exists, <see langword="null"/> otherwise. </returns>
private static MethodInfo FindSerialiserMethod(Type serialisableType)
private static MethodInfo FindSerialiser(Type serialisableType)
{
// Go through the public methods of the Serialise class
Type serialiserClassType = typeof(Serialise);
Expand Down

0 comments on commit dfb84de

Please sign in to comment.