This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Enum<EnumT> where EnumT : Enum | |
{ | |
public static void ForEach(Action<EnumT> action) | |
{ | |
foreach (EnumT status in Enum.GetValues(typeof(EnumT))) | |
action(status); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project> | |
<PropertyGroup> | |
<Configuration>Debug</Configuration> | |
<Platform>Any CPU</Platform> | |
<PublishDir>..\..\..\..\NuGetLocal</PublishDir> | |
<PublishProtocol>FileSystem</PublishProtocol> | |
<TargetFramework>netstandard2.1</TargetFramework> | |
<VersionSuffix>$([System.DateTime]::Now.ToString("yyyyMMddHHmmss"))</VersionSuffix> | |
</PropertyGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class NewtonsoftJsonFormatter | |
{ | |
public static object OrderedPropertiesAlphabeticallyAsc(dynamic dynamicJsonObj) | |
{ | |
if (dynamicJsonObj is JObject jObj) | |
{ | |
var sortedProperties = jObj.AsJEnumerable().OrderBy(x => x.Path).ToList(); | |
var sortedObj = new JObject(); | |
foreach (var item in sortedProperties) |
OlderNewer