Skip to content

Commit

Permalink
Ensure JSON Namging Stragey on Models #35
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Jump committed Sep 18, 2019
1 parent 2bd2aa5 commit f9eb827
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 57 deletions.
5 changes: 4 additions & 1 deletion uSync8.BackOffice/Configuration/BackOfficeConfig.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Linq;
Expand All @@ -7,6 +9,7 @@

namespace uSync8.BackOffice.Configuration
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]
public class uSyncConfig
{
public uSyncSettings Settings { get; set; }
Expand Down
5 changes: 4 additions & 1 deletion uSync8.BackOffice/Configuration/uSyncHandlerSettings.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;

namespace uSync8.BackOffice.Configuration
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]
public class HandlerSettings
{
public string Alias { get; }
Expand Down
11 changes: 5 additions & 6 deletions uSync8.BackOffice/Configuration/uSyncSettings.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.XPath;

using Umbraco.Core;
using uSync8.BackOffice.SyncHandlers;

namespace uSync8.BackOffice.Configuration
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]
public class uSyncSettings
{
public string RootFolder { get; set; } = "~/uSync/v8/";
Expand Down
5 changes: 0 additions & 5 deletions uSync8.BackOffice/Models/ISyncAddOn.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace uSync8.BackOffice.Models
{
Expand Down
27 changes: 0 additions & 27 deletions uSync8.BackOffice/Models/SyncAction.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
using uSync8.BackOffice.Configuration;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using uSync8.BackOffice.Configuration;

namespace uSync8.BackOffice.SyncHandlers
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]

public class ExtendedHandlerConfigPair
{
public ISyncExtendedHandler Handler { get; set; }
Expand Down
6 changes: 5 additions & 1 deletion uSync8.BackOffice/SyncHandlers/Models/SyncHandlerOptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
namespace uSync8.BackOffice.SyncHandlers
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace uSync8.BackOffice.SyncHandlers
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]
/// <summary>
/// options that define how we define a handler
/// </summary>
Expand Down
8 changes: 5 additions & 3 deletions uSync8.BackOffice/uSyncAction.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using uSync8.Core;
using uSync8.Core.Models;

namespace uSync8.BackOffice
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]

public struct uSyncAction
{
public string HandlerAlias { get; set; }
Expand Down
9 changes: 4 additions & 5 deletions uSync8.Core/Dependency/uSyncDependency.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

using Umbraco.Core;

namespace uSync8.Core.Dependency
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]
public class uSyncDependency
{
/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion uSync8.Core/Models/SyncAttempt.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

using System;
using System.Collections.Generic;

namespace uSync8.Core.Models
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]
public struct SyncAttempt<TObject>
{
public bool Success { get; private set; }
Expand Down
8 changes: 2 additions & 6 deletions uSync8.Core/Models/uSyncChange.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Serialization;

namespace uSync8.Core.Models
{
[JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))]
public class uSyncChange
{
public string Name { get; set; }
Expand Down

0 comments on commit f9eb827

Please sign in to comment.