Skip to content

Commit

Permalink
updated namespaces for formats to include "Formats" part
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkonopka committed Nov 3, 2019
1 parent a31e358 commit 3c1877c
Show file tree
Hide file tree
Showing 30 changed files with 59 additions and 51 deletions.
8 changes: 4 additions & 4 deletions src/UXI.Serialization.Reactive/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("UXI.Serialization.Reactive")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HP Inc.")]
[assembly: AssemblyCompany("UXI@FIIT")]
[assembly: AssemblyProduct("UXI.Serialization.Reactive")]
[assembly: AssemblyCopyright("Copyright © HP Inc. 2018")]
[assembly: AssemblyCopyright("Copyright (c) 2019 Faculty of Informatics and Information Technologies, Slovak University of Technology in Bratislava")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
12 changes: 12 additions & 0 deletions src/UXI.Serialization/DataIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ public void WriteOutput(IEnumerable<object> data, string filePath, FileFormat fi
}


public void WriteOutput<T>(IEnumerable<T> data, string filePath, FileFormat format, object settings)
{
WriteOutput(data?.Cast<object>(), filePath, format, typeof(T), settings);
}


public void WriteOutput(IEnumerable<object> data, TextWriter writer, FileFormat format, Type dataType, object settings)
{
using (var dataWriter = GetOutputDataWriter(writer, format, dataType, settings))
Expand All @@ -103,6 +109,12 @@ public void WriteOutput(IEnumerable<object> data, TextWriter writer, FileFormat
}


public void WriteOutput<T>(IEnumerable<T> data, TextWriter writer, FileFormat format, object settings)
{
WriteOutput(data?.Cast<object>(), writer, format, typeof(T), settings);
}


public IDataWriter GetOutputDataWriter(TextWriter writer, FileFormat fileType, Type dataType, object settings)
{
ISerializationFactory factory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using System.Text;
using System.Threading.Tasks;
using UXI.Serialization.Configurations;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv.Converters;

namespace UXI.Serialization.Csv.Configurations
namespace UXI.Serialization.Formats.Csv.Configurations
{
public class CsvConvertersSerializationConfiguration : SerializationConfiguration<CsvSerializerContext>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;
using UXI.Serialization.Configurations;
using UXI.Serialization.Csv;
using UXI.Serialization.Formats.Csv;

namespace UXI.Serialization.Formats.Csv.Configurations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using CsvHelper;
using UXI.Serialization.Common;

namespace UXI.Serialization.Csv.Converters
namespace UXI.Serialization.Formats.Csv.Converters
{
public abstract class CsvConverter
{
Expand Down
2 changes: 1 addition & 1 deletion src/UXI.Serialization/Formats/Csv/CsvDataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using CsvHelper;
using UXI.Serialization.Common;

namespace UXI.Serialization.Csv
namespace UXI.Serialization.Formats.Csv
{
public class CsvDataReader : DisposableBase, IDataReader, IDisposable
{
Expand Down
2 changes: 1 addition & 1 deletion src/UXI.Serialization/Formats/Csv/CsvDataWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using CsvHelper;
using UXI.Serialization.Common;

namespace UXI.Serialization.Csv
namespace UXI.Serialization.Formats.Csv
{
public class CsvDataWriter : DisposableBase, IDataWriter, IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;

namespace UXI.Serialization.Csv
namespace UXI.Serialization.Formats.Csv
{
public class CsvHeaderNamingContext
{
Expand Down
5 changes: 2 additions & 3 deletions src/UXI.Serialization/Formats/Csv/CsvSerializationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv.Converters;


namespace UXI.Serialization.Csv
namespace UXI.Serialization.Formats.Csv
{
public class CsvSerializationFactory : ISerializationFactory
{
Expand Down
4 changes: 2 additions & 2 deletions src/UXI.Serialization/Formats/Csv/CsvSerializerContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using System.Threading.Tasks;
using CsvHelper.Configuration;
using UXI.Serialization.Common;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv.Converters;

namespace UXI.Serialization.Csv
namespace UXI.Serialization.Formats.Csv
{
public class CsvSerializerContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using UXI.Serialization.Configurations;

namespace UXI.Serialization.Json.Configurations
namespace UXI.Serialization.Formats.Json.Configurations
{
public class JsonConvertersSerializationConfiguration : SerializationConfiguration<JsonSerializer>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Newtonsoft.Json.Linq;
using UXI.Serialization.Common;

namespace UXI.Serialization.Json.Converters
namespace UXI.Serialization.Formats.Json.Converters
{
public abstract class GenericJsonConverter<T> : Newtonsoft.Json.JsonConverter
{
Expand Down
2 changes: 1 addition & 1 deletion src/UXI.Serialization/Formats/Json/Extensions/JObjectEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace UXI.Serialization.Json.Extensions
namespace UXI.Serialization.Formats.Json.Extensions
{
public static class JObjectEx
{
Expand Down
2 changes: 1 addition & 1 deletion src/UXI.Serialization/Formats/Json/JsonDataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Newtonsoft.Json.Linq;
using UXI.Serialization.Common;

namespace UXI.Serialization.Json
namespace UXI.Serialization.Formats.Json
{
public class JsonDataReader : DisposableBase, IDataReader, IDisposable
{
Expand Down
2 changes: 1 addition & 1 deletion src/UXI.Serialization/Formats/Json/JsonDataWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Newtonsoft.Json;
using UXI.Serialization.Common;

namespace UXI.Serialization.Json
namespace UXI.Serialization.Formats.Json
{
public class JsonDataWriter : DisposableBase, IDataWriter, IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using UXI.Serialization.Json.Converters;
using UXI.Serialization.Formats.Json.Converters;

namespace UXI.Serialization.Json
namespace UXI.Serialization.Formats.Json
{
public class JsonSerializationFactory : ISerializationFactory
{
Expand Down
8 changes: 4 additions & 4 deletions src/UXI.Serialization/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("UXI.Serialization")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("UXI Dev")]
[assembly: AssemblyCompany("UXI@FIIT")]
[assembly: AssemblyProduct("UXI.Serialization")]
[assembly: AssemblyCopyright("Copyright © UXI 2018")]
[assembly: AssemblyCopyright("Copyright (c) 2019 Faculty of Informatics and Information Technologies, Slovak University of Technology in Bratislava")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
3 changes: 0 additions & 3 deletions src/UXI.Serialization/SerializationFactoryCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ namespace UXI.Serialization
{
public class SerializationFactoryCollection : Collection<ISerializationFactory>
{


}

}
4 changes: 2 additions & 2 deletions test/UXI.Serialization.Test/DataIOTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using UXI.Serialization.Csv;
using UXI.Serialization.Json;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Json;

namespace UXI.Serialization
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using UXI.Serialization.Csv;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Csv.Converters;
using UXI.Serialization.Fakes;

namespace UXI.Serialization.Fakes.Csv.Converters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using UXI.Serialization.Csv;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Csv.Converters;

namespace UXI.Serialization.Fakes.Csv.Converters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using UXI.Serialization.Csv;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Csv.Converters;
using UXI.Serialization.Fakes;

namespace UXI.Serialization.Fakes.Csv.Converters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using UXI.Serialization.Csv;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Csv.Converters;
using UXI.Serialization.Fakes;

namespace UXI.Serialization.Fakes.Csv.Converters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using UXI.Serialization.Csv;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Csv.Converters;

namespace UXI.Serialization.Fakes.Csv.Converters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using UXI.Serialization.Csv;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Csv.Converters;

namespace UXI.Serialization.Fakes.Csv.Converters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using UXI.Serialization.Csv;
using UXI.Serialization.Csv.Converters;
using UXI.Serialization.Formats.Csv;
using UXI.Serialization.Formats.Csv.Converters;
using UXI.Serialization.Fakes;

namespace UXI.Serialization.Fakes.Csv.Converters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UXI.Serialization.Json.Converters;
using UXI.Serialization.Json.Extensions;
using UXI.Serialization.Formats.Json.Converters;
using UXI.Serialization.Formats.Json.Extensions;

namespace UXI.Serialization.Fakes.Json.Converters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using UXI.Serialization.Fakes;
using UXI.Serialization.Fakes.Csv.Converters;

namespace UXI.Serialization.Csv.Converters
namespace UXI.Serialization.Formats.Csv.Converters
{
[TestClass]
public class CsvConverterTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text;
using System.Threading.Tasks;

namespace UXI.Serialization.Csv
namespace UXI.Serialization.Formats.Csv
{
[TestClass]
public class CsvHeaderNamingContextText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using UXI.Serialization.Fakes;
using UXI.Serialization.Fakes.Json.Converters;

namespace UXI.Serialization.Json.Converters
namespace UXI.Serialization.Formats.Json.Converters
{
[TestClass]
public class GenericJsonConverterTest
Expand Down

0 comments on commit 3c1877c

Please sign in to comment.