Skip to content

Commit

Permalink
Added XmlContentSerializer.CreateTypeResolver. The purpose of this fu…
Browse files Browse the repository at this point in the history
…nction is to scan an assembly and find all types annotated with [XmlRoot] attributes, and pull the associated local and namespace names out of them.
  • Loading branch information
moodmosaic committed Oct 8, 2014
1 parent 7edeba5 commit 20df4f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AtomEventStore.UnitTests/XmlContentSerializerTests.cs
Expand Up @@ -129,5 +129,12 @@ public void SutIsContentSerializer(XmlContentSerializer sut)
}
}
}

[Fact]
public void CreateTypeResolverWithNullAssemblyThrows()
{
Assert.Throws<ArgumentNullException>(() =>
XmlContentSerializer.CreateTypeResolver(null));
}
}
}
10 changes: 10 additions & 0 deletions AtomEventStore/XmlContentSerializer.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
Expand Down Expand Up @@ -106,5 +107,14 @@ public XmlAtomContent Deserialize(XmlReader xmlReader)

return new XmlAtomContent(value);
}

public static ITypeResolver CreateTypeResolver(
Assembly assemblyToScanForEvents)
{
if (assemblyToScanForEvents == null)
throw new ArgumentNullException("assemblyToScanForEvents");

throw new NotImplementedException();
}
}
}

0 comments on commit 20df4f1

Please sign in to comment.