From b7f74fbf80f9e83ef7910c89732efbc4b8ca08f7 Mon Sep 17 00:00:00 2001 From: Glenn Block Date: Wed, 22 Oct 2014 16:55:50 -0700 Subject: [PATCH 1/2] Adding abstract writer class with new overload --- .../CollectionJsonDocumentWriter_Of_T.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs diff --git a/src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs b/src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs new file mode 100644 index 0000000..b3af930 --- /dev/null +++ b/src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CollectionJson +{ + public abstract class CollectionJsonDocumentWriter : ICollectionJsonDocumentWriter + { + public virtual IReadDocument Write(IEnumerable data, Uri uri) + { + return null; + } + + public virtual IReadDocument Write(IEnumerable data) + { + return null; + } + } +} From f39b0aad4ea5556fecfc30eb44c9172a577ce6a8 Mon Sep 17 00:00:00 2001 From: Glenn Block Date: Wed, 22 Oct 2014 16:59:08 -0700 Subject: [PATCH 2/2] Updating the project file, also adding exception handling --- src/CollectionJson/CollectionJson.csproj | 1 + src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CollectionJson/CollectionJson.csproj b/src/CollectionJson/CollectionJson.csproj index bbe115c..cf96e16 100644 --- a/src/CollectionJson/CollectionJson.csproj +++ b/src/CollectionJson/CollectionJson.csproj @@ -46,6 +46,7 @@ Properties\VersionInfo.cs + diff --git a/src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs b/src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs index b3af930..8b8f7c0 100644 --- a/src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs +++ b/src/CollectionJson/CollectionJsonDocumentWriter_Of_T.cs @@ -9,12 +9,12 @@ public abstract class CollectionJsonDocumentWriter : ICollectionJsonDocum { public virtual IReadDocument Write(IEnumerable data, Uri uri) { - return null; + throw new NotImplementedException(); } public virtual IReadDocument Write(IEnumerable data) { - return null; + throw new NotImplementedException(); } } }