Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions uSync.BackOffice/Configuration/uSyncSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Text.Json.Serialization;

namespace uSync.BackOffice.Configuration;

Expand Down Expand Up @@ -264,6 +265,7 @@ public class uSyncSettings
/// <summary>
/// uSync's folder mode - normal, root or production
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<SyncFolderMode>))]
public enum SyncFolderMode
{
/// <summary>
Expand All @@ -285,6 +287,7 @@ public enum SyncFolderMode
/// <summary>
/// Mode is where the processing happens - normal or background
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<SyncProcessingMode>))]
public enum SyncProcessingMode
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions uSync.BackOffice/SyncHandlers/Models/HandlerActionNames.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using System.Text.Json.Serialization;

namespace uSync.BackOffice.SyncHandlers.Models;

/// <summary>
/// Possible actions a handler can do (stored in config)
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<HandlerActions>))]
public enum HandlerActions
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions uSync.Core/ChangeType.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Runtime.Serialization;
using System.Text.Json.Serialization;

namespace uSync.Core;

/// <summary>
/// Type of change performed
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<ChangeType>))]
public enum ChangeType : int
{
[EnumMember(Value = "Clean")]
Expand Down
5 changes: 4 additions & 1 deletion uSync.Core/Dependency/uSyncDependency.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Umbraco.Cms.Core;
using System.Text.Json.Serialization;

using Umbraco.Cms.Core;

namespace uSync.Core.Dependency;

Expand Down Expand Up @@ -90,6 +92,7 @@ private static void FireUpdate(string message, int count, int total)
/// <summary>
/// the match mode for the dependency (reserved)
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<DependencyMode>))]
public enum DependencyMode
{
MustMatch,
Expand Down
1 change: 1 addition & 0 deletions uSync.Core/Models/uSyncChange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public static uSyncChange Warning(string path, string name, string warning)
};
}

[JsonConverter(typeof(JsonStringEnumConverter<ChangeDetailType>))]
public enum ChangeDetailType
{
NoChange,
Expand Down
5 changes: 4 additions & 1 deletion uSync.Core/Sync/SyncTreeType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace uSync.Core.Sync;
using System.Text.Json.Serialization;

namespace uSync.Core.Sync;

/// <summary>
/// The type of tree item this is.
Expand All @@ -15,6 +17,7 @@
/// we can treat it as a 'settings' tree and show the
/// menus when they are valid.
/// </remarks>
[JsonConverter(typeof(JsonStringEnumConverter<SyncTreeType>))]
public enum SyncTreeType
{
/// <summary>
Expand Down
5 changes: 4 additions & 1 deletion uSync.Core/SyncActionType.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
namespace uSync.Core;
using System.Text.Json.Serialization;

namespace uSync.Core;

/// <summary>
/// indicates what happened to an item to cause a ghost file
/// to be present.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<SyncActionType>))]
public enum SyncActionType
{
None = 0,
Expand Down
2 changes: 2 additions & 0 deletions uSync.Core/Tracking/SyncXmlTracker.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
using System.Xml.Linq;
using System.Xml.XPath;

Expand Down Expand Up @@ -414,6 +415,7 @@ public class TrackingKey
public bool IsAttribute { get; set; }
}

[JsonConverter(typeof(JsonStringEnumConverter<TrackingDirection>))]
public enum TrackingDirection
{
TargetToSource,
Expand Down
5 changes: 4 additions & 1 deletion uSync.Core/uSyncContentState.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
namespace uSync.Core;
using System.Text.Json.Serialization;

namespace uSync.Core;

/// <summary>
/// the state we thing a culture / content item should be in.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<uSyncContentState>))]
public enum uSyncContentState
{
Saved, Unpublished, Published
Expand Down