From 9d6037dfbc7f48932723d25127f4e352bee0d4c1 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 28 Feb 2021 15:33:31 +0100 Subject: [PATCH 1/7] Trigger exclusions --- azure-pipelines.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b75c1894d..b1215f769 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,16 @@ trigger: -- development + branches: + include: + - development + paths: + exclude: + - docfx/ + - azure-pipelines.yml + - BuildDocfxImage.ps1 + - docker-compose.yml + - Dockerfile.docfx + - LICENSE.md + - README.md variables: - group: Integration Test From 90e216de31acc241ac59a17657f9ff20103f39a8 Mon Sep 17 00:00:00 2001 From: gimlichael Date: Sun, 28 Feb 2021 18:14:46 +0100 Subject: [PATCH 2/7] Hide IHierarchy related exxtension methods using IDecorator. --- .../HierarchyDecoratorExtensions.cs | 238 ++++++++++++++++- src/Cuemon.Core/Hierarchy.cs | 6 +- src/Cuemon.Core/HierarchyExtensions.cs | 244 ------------------ .../Serialization/HierarchySerializer.cs | 2 +- .../Converters/DefaultXmlConverter.cs | 4 +- 5 files changed, 241 insertions(+), 253 deletions(-) delete mode 100644 src/Cuemon.Core/HierarchyExtensions.cs diff --git a/src/Cuemon.Core/Extensions/HierarchyDecoratorExtensions.cs b/src/Cuemon.Core/Extensions/HierarchyDecoratorExtensions.cs index 02791bbde..e1d0f979e 100644 --- a/src/Cuemon.Core/Extensions/HierarchyDecoratorExtensions.cs +++ b/src/Cuemon.Core/Extensions/HierarchyDecoratorExtensions.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Linq; using System.Reflection; +using Cuemon.Collections.Generic; namespace Cuemon { @@ -27,7 +28,7 @@ public static class HierarchyDecoratorExtensions public static IConvertible UseConvertibleFormatter(this IDecorator> decorator) { Validator.ThrowIfNull(decorator, nameof(decorator)); - var i = decorator.Inner.FindSingleInstance(h => ConvertibleTypes.Select(pair => pair.Value).Contains(h.Instance.Name)); + var i = decorator.FindSingleInstance(h => ConvertibleTypes.Select(pair => pair.Value).Contains(h.Instance.Name)); return Decorator.Enclose(i.Value).ChangeType(ConvertibleTypes.Single(pair => pair.Value == i.Name).Key) as IConvertible; } @@ -42,7 +43,7 @@ public static IConvertible UseConvertibleFormatter(this IDecorator> decorator) { Validator.ThrowIfNull(decorator, nameof(decorator)); - var ticks = decorator.Inner.FindSingleInstance(h => h.Instance.Name.Equals("Ticks", StringComparison.OrdinalIgnoreCase)); + var ticks = decorator.FindSingleInstance(h => h.Instance.Name.Equals("Ticks", StringComparison.OrdinalIgnoreCase)); return ticks == null ? decorator.Inner.UseGenericConverter() : TimeSpan.FromTicks(Convert.ToInt64(ticks.Value)); } @@ -57,7 +58,7 @@ public static TimeSpan UseTimeSpanFormatter(this IDecorator public static Uri UseUriFormatter(this IDecorator> decorator) { Validator.ThrowIfNull(decorator, nameof(decorator)); - var uri = decorator.Inner.FindSingleInstance(h => h.Instance.Name.Equals("OriginalString", StringComparison.OrdinalIgnoreCase)); + var uri = decorator.FindSingleInstance(h => h.Instance.Name.Equals("OriginalString", StringComparison.OrdinalIgnoreCase)); return uri == null ? decorator.Inner.UseGenericConverter() : Decorator.Enclose(uri.Value.ToString()).ToUri(); } @@ -160,6 +161,237 @@ public static IDictionary UseDictionary(this IDecorator> de return dicInstance as IDictionary; } + /// + /// Returns the first node instance that match the conditions defined by the function delegate , or a default value if no node is found. + /// + /// The type of the instance that this node represents. + /// The to extend. + /// The function delegate that defines the conditions of the nodes to search for. + /// An that match the conditions defined by the function delegate , or a default value if no node is found. + public static T FindFirstInstance(this IDecorator> decorator, Func, bool> match) + { + return FindInstance(decorator, match).FirstOrDefault(); + } + + /// + /// Returns the only node that match the conditions defined by the function delegate , or a default value if no node instance is found; this method throws an exception if more than one node is found. + /// + /// The type of the instance that this node represents. + /// The to extend. + /// The function delegate that defines the conditions of the nodes to search for. + /// An node that match the conditions defined by the function delegate , or a default value if no node instance is found. + public static T FindSingleInstance(this IDecorator> decorator, Func, bool> match) + { + return FindInstance(decorator, match).SingleOrDefault(); + } + + /// + /// Retrieves all node instances that match the conditions defined by the function delegate . + /// + /// The type of the instance that this node represents. + /// The to extend. + /// The function delegate that defines the conditions of the nodes to search for. + /// An sequence containing all node instances that match the conditions defined by the specified predicate, if found. + public static IEnumerable FindInstance(this IDecorator> decorator, Func, bool> match) + { + return Find(decorator, match).Select(h => h.Instance); + } + + /// + /// Returns the first node that match the conditions defined by the function delegate , or a default value if no node is found. + /// + /// The type of the instance that this node represents. + /// The to extend. + /// The function delegate that defines the conditions of the nodes to search for. + /// An node that match the conditions defined by the function delegate , or a default value if no node is found. + public static IHierarchy FindFirst(this IDecorator> decorator, Func, bool> match) + { + return Find(decorator, match).FirstOrDefault(); + } + + /// + /// Returns the only node that match the conditions defined by the function delegate , or a default value if no node is found; this method throws an exception if more than one node is found. + /// + /// The type of the instance that this node represents. + /// The to extend. + /// The function delegate that defines the conditions of the nodes to search for. + /// An node that match the conditions defined by the function delegate , or a default value if no node is found. + public static IHierarchy FindSingle(this IDecorator> decorator, Func, bool> match) + { + return Find(decorator, match).SingleOrDefault(); + } + + /// + /// Retrieves all nodes that match the conditions defined by the function delegate . + /// + /// The type of the instance that this node represents. + /// The to extend. + /// The function delegate that defines the conditions of the nodes to search for. + /// An sequence containing all nodes that match the conditions defined by the specified predicate, if found. + public static IEnumerable> Find(this IDecorator> decorator, Func, bool> match) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + Validator.ThrowIfNull(match, nameof(match)); + return DescendantsAndSelf(decorator).Where(match); + } + + /// + /// Replace the instance of the with a delegate. + /// + /// The type of the instance that this node represents. + /// The to extend. + /// The delegate that will replace the wrapped instance of the . + public static void Replace(this IDecorator> decorator, Action, T> replacer) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + Validator.ThrowIfNull(replacer, nameof(replacer)); + replacer(decorator.Inner, decorator.Inner.Instance); + } + + /// + /// Replace all instances of the with a delegate. + /// + /// The type of the instance that these nodes represents. + /// The to extend. + /// The delegate that will replace all wrapped instances of the . + public static void ReplaceAll(this IDecorator>> decorator, Action, T> replacer) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + Validator.ThrowIfNull(replacer, nameof(replacer)); + foreach (var node in decorator.Inner) + { + Replace(Decorator.Enclose(node), replacer); + } + } + + /// + /// Returns the root node of the specified in the hierarchical structure. + /// + /// The type of the instance represented by the specified in the hierarchical structure. + /// The to extend. + /// An node that represents the root of the specified . + /// + /// is null. + /// + public static IHierarchy Root(this IDecorator> decorator) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + return decorator.Inner.HasParent ? AncestorsAndSelf(decorator).FirstOrDefault() : decorator.Inner; + } + + /// + /// Gets all ancestors (parent, grandparent, etc.) and self of the specified in the hierarchical structure. + /// + /// The type of the instance represented by the specified in the hierarchical structure. + /// The to extend. + /// An sequence equal to ancestors and self of the specified . + /// + /// is null. + /// + public static IEnumerable> AncestorsAndSelf(this IDecorator> decorator) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + IList> result = new List>(Hierarchy.WhileSourceTraversalIsNotNull(decorator.Inner, Hierarchy.AncestorsAndSelf)); + return result.Count > 0 ? result.Reverse() : Arguments.Yield(decorator.Inner); + } + + /// + /// Gets all descendants (children, grandchildren, etc.) anf self of the current in the hierarchical structure. + /// + /// The type of the instance represented by the specified in the hierarchical structure. + /// The to extend. + /// An sequence equal to the descendants and self of the specified . + /// + /// is null. + /// + public static IEnumerable> DescendantsAndSelf(this IDecorator> decorator) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + return Hierarchy.WhileSourceTraversalHasElements(decorator.Inner, Hierarchy.DescendantsAndSelf).Reverse(); + } + + /// + /// Gets all siblings and self after the current in the hierarchical structure. + /// + /// The type of the instance represented by the specified in the hierarchical structure. + /// The to extend. + /// An sequence equal to the siblings and self of the specified . + /// + /// is null. + /// + public static IEnumerable> SiblingsAndSelf(this IDecorator> decorator) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + return SiblingsAndSelfAt(decorator, decorator.Inner.Depth); + } + + /// + /// Gets all siblings and self after the current in the hierarchical structure. + /// + /// The type of the instance represented by the specified in the hierarchical structure. + /// The to extend. + /// The depth in the hierarchical structure from where to locate the siblings and self nodes. + /// An sequence equal to the siblings and self of the specified . + /// + /// is null. + /// + /// + /// is less than zero. + /// + public static IEnumerable> SiblingsAndSelfAt(this IDecorator> decorator, int depth) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + Validator.ThrowIfLowerThan(depth, 0, nameof(depth)); + var root = AncestorsAndSelf(decorator).FirstOrDefault(); + var descendantsFromRoot = DescendantsAndSelf(Decorator.Enclose(root)); + foreach (var descendantItem in descendantsFromRoot) + { + if (descendantItem.Depth == depth) { yield return descendantItem; } + } + } + + /// + /// Returns the node at the specified index of a hierarchical structure. + /// + /// The type of the instance represented by the specified in the hierarchical structure. + /// The to extend. + /// The zero-based index at which a node should be retrieved in the hierarchical structure. + /// The node at the specified in the hierarchical structure. + /// + /// is null. + /// + /// + /// is less than zero - or - exceeded the count of nodes in the hierarchical structure. + /// + public static IHierarchy NodeAt(this IDecorator> decorator, int index) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + Validator.ThrowIfLowerThan(index, 0, nameof(index)); + if (decorator.Inner.Index == index) { return decorator.Inner; } + var allNodes = FlattenAll(decorator); + foreach (var element in allNodes) + { + if (element.Index == index) { return element; } + } + throw new ArgumentOutOfRangeException(nameof(index)); + } + + /// + /// Flattens the entirety of a hierarchical structure representation into an sequence of nodes. + /// + /// The type of the instance represented by the specified in the hierarchical structure. + /// The to extend. + /// An sequence of all nodes represented by the hierarchical structure. + /// + /// is null. + /// + public static IEnumerable> FlattenAll(this IDecorator> decorator) + { + Validator.ThrowIfNull(decorator, nameof(decorator)); + var root = AncestorsAndSelf(decorator).FirstOrDefault(); + return DescendantsAndSelf(Decorator.Enclose(root)); + } + private static T UseGenericConverter(this IHierarchy hierarchy) { return (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromInvariantString(hierarchy.Instance.Value.ToString()); diff --git a/src/Cuemon.Core/Hierarchy.cs b/src/Cuemon.Core/Hierarchy.cs index 95c55b43f..76578e50b 100644 --- a/src/Cuemon.Core/Hierarchy.cs +++ b/src/Cuemon.Core/Hierarchy.cs @@ -60,7 +60,7 @@ public Hierarchy() /// Gets the node at the specified index. /// /// The node at the specified index. - public IHierarchy this[int index] => this.NodeAt(index); + public IHierarchy this[int index] => Decorator.Enclose(this).NodeAt(index); #endregion @@ -162,8 +162,8 @@ public IHierarchy Add(T instance, Type instanceType, MemberInfo member) private static int CalculateIndex(Hierarchy newItem) { - var rootItem = newItem.Root(); - var allItems = rootItem.DescendantsAndSelf(); + var rootItem = Decorator.Enclose(newItem).Root(); + var allItems = Decorator.Enclose(rootItem).DescendantsAndSelf(); return allItems.Count(); } diff --git a/src/Cuemon.Core/HierarchyExtensions.cs b/src/Cuemon.Core/HierarchyExtensions.cs deleted file mode 100644 index f5ca9a1ea..000000000 --- a/src/Cuemon.Core/HierarchyExtensions.cs +++ /dev/null @@ -1,244 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Cuemon.Collections.Generic; - -namespace Cuemon -{ - /// - /// Extension methods for a hierarchical structure based on . - /// - public static class HierarchyExtensions - { - /// - /// Returns the first node instance that match the conditions defined by the function delegate , or a default value if no node is found. - /// - /// The type of the instance that this node represents. - /// The node to search. - /// The function delegate that defines the conditions of the nodes to search for. - /// An that match the conditions defined by the function delegate , or a default value if no node is found. - public static T FindFirstInstance(this IHierarchy node, Func, bool> match) - { - return FindInstance(node, match).FirstOrDefault(); - } - - /// - /// Returns the only node that match the conditions defined by the function delegate , or a default value if no node instance is found; this method throws an exception if more than one node is found. - /// - /// The type of the instance that this node represents. - /// The node to search. - /// The function delegate that defines the conditions of the nodes to search for. - /// An node that match the conditions defined by the function delegate , or a default value if no node instance is found. - public static T FindSingleInstance(this IHierarchy node, Func, bool> match) - { - return FindInstance(node, match).SingleOrDefault(); - } - - /// - /// Retrieves all node instances that match the conditions defined by the function delegate . - /// - /// The type of the instance that this node represents. - /// The node to search. - /// The function delegate that defines the conditions of the nodes to search for. - /// An sequence containing all node instances that match the conditions defined by the specified predicate, if found. - public static IEnumerable FindInstance(this IHierarchy node, Func, bool> match) - { - return Find(node, match).Select(h => h.Instance); - } - - /// - /// Returns the first node that match the conditions defined by the function delegate , or a default value if no node is found. - /// - /// The type of the instance that this node represents. - /// The node to search. - /// The function delegate that defines the conditions of the nodes to search for. - /// An node that match the conditions defined by the function delegate , or a default value if no node is found. - public static IHierarchy FindFirst(this IHierarchy node, Func, bool> match) - { - return Find(node, match).FirstOrDefault(); - } - - /// - /// Returns the only node that match the conditions defined by the function delegate , or a default value if no node is found; this method throws an exception if more than one node is found. - /// - /// The type of the instance that this node represents. - /// The node to search. - /// The function delegate that defines the conditions of the nodes to search for. - /// An node that match the conditions defined by the function delegate , or a default value if no node is found. - public static IHierarchy FindSingle(this IHierarchy node, Func, bool> match) - { - return Find(node, match).SingleOrDefault(); - } - - /// - /// Retrieves all nodes that match the conditions defined by the function delegate . - /// - /// The type of the instance that this node represents. - /// The node to search. - /// The function delegate that defines the conditions of the nodes to search for. - /// An sequence containing all nodes that match the conditions defined by the specified predicate, if found. - public static IEnumerable> Find(this IHierarchy node, Func, bool> match) - { - Validator.ThrowIfNull(node, nameof(node)); - Validator.ThrowIfNull(match, nameof(match)); - return DescendantsAndSelf(node).Where(match); - } - - /// - /// Replace the instance of the with a delegate. - /// - /// The type of the instance that this node represents. - /// The node to replace with a new instance. - /// The delegate that will replace the wrapped instance of the . - public static void Replace(this IHierarchy node, Action, T> replacer) - { - Validator.ThrowIfNull(node, nameof(node)); - Validator.ThrowIfNull(replacer, nameof(replacer)); - replacer(node, node.Instance); - } - - /// - /// Replace all instances of the with a delegate. - /// - /// The type of the instance that these nodes represents. - /// The sequence of nodes to replace with a new instance. - /// The delegate that will replace all wrapped instances of the . - public static void ReplaceAll(this IEnumerable> nodes, Action, T> replacer) - { - Validator.ThrowIfNull(nodes, nameof(nodes)); - Validator.ThrowIfNull(replacer, nameof(replacer)); - foreach (var node in nodes) - { - Replace(node, replacer); - } - } - - /// - /// Returns the root node of the specified in the hierarchical structure. - /// - /// The type of the instance represented by the specified in the hierarchical structure. - /// The node that the hierarchical structure represents. - /// An node that represents the root of the specified . - /// - /// is null. - /// - public static IHierarchy Root(this IHierarchy node) - { - Validator.ThrowIfNull(node, nameof(node)); - return node.HasParent ? AncestorsAndSelf(node).FirstOrDefault() : node; - } - - /// - /// Gets all ancestors (parent, grandparent, etc.) and self of the specified in the hierarchical structure. - /// - /// The type of the instance represented by the specified in the hierarchical structure. - /// The node that the hierarchical structure represents. - /// An sequence equal to ancestors and self of the specified . - /// - /// is null. - /// - public static IEnumerable> AncestorsAndSelf(this IHierarchy node) - { - Validator.ThrowIfNull(node, nameof(node)); - IList> result = new List>(Hierarchy.WhileSourceTraversalIsNotNull(node, Hierarchy.AncestorsAndSelf)); - return result.Count > 0 ? result.Reverse() : Arguments.Yield(node); - } - - /// - /// Gets all descendants (children, grandchildren, etc.) anf self of the current in the hierarchical structure. - /// - /// The type of the instance represented by the specified in the hierarchical structure. - /// The node that the hierarchical structure represents. - /// An sequence equal to the descendants and self of the specified . - /// - /// is null. - /// - public static IEnumerable> DescendantsAndSelf(this IHierarchy node) - { - Validator.ThrowIfNull(node, nameof(node)); - return Hierarchy.WhileSourceTraversalHasElements(node, Hierarchy.DescendantsAndSelf).Reverse(); - } - - /// - /// Gets all siblings and self after the current in the hierarchical structure. - /// - /// The type of the instance represented by the specified in the hierarchical structure. - /// The node that the hierarchical structure represents. - /// An sequence equal to the siblings and self of the specified . - /// - /// is null. - /// - public static IEnumerable> SiblingsAndSelf(this IHierarchy node) - { - Validator.ThrowIfNull(node, nameof(node)); - return SiblingsAndSelfAt(node, node.Depth); - } - - /// - /// Gets all siblings and self after the current in the hierarchical structure. - /// - /// The type of the instance represented by the specified in the hierarchical structure. - /// The node that the hierarchical structure represents. - /// The depth in the hierarchical structure from where to locate the siblings and self nodes. - /// An sequence equal to the siblings and self of the specified . - /// - /// is null. - /// - /// - /// is less than zero. - /// - public static IEnumerable> SiblingsAndSelfAt(this IHierarchy node, int depth) - { - Validator.ThrowIfNull(node, nameof(node)); - Validator.ThrowIfLowerThan(depth, 0, nameof(depth)); - var root = AncestorsAndSelf(node).FirstOrDefault(); - var descendantsFromRoot = DescendantsAndSelf(root); - foreach (var descendantItem in descendantsFromRoot) - { - if (descendantItem.Depth == depth) { yield return descendantItem; } - } - } - - /// - /// Returns the node at the specified index of a hierarchical structure. - /// - /// The type of the instance represented by the specified in the hierarchical structure. - /// The node from which the flattening will begin. - /// The zero-based index at which a node should be retrieved in the hierarchical structure. - /// The node at the specified in the hierarchical structure. - /// - /// is null. - /// - /// - /// is less than zero - or - exceeded the count of nodes in the hierarchical structure. - /// - public static IHierarchy NodeAt(this IHierarchy node, int index) - { - Validator.ThrowIfNull(node, nameof(node)); - Validator.ThrowIfLowerThan(index, 0, nameof(index)); - if (node.Index == index) { return node; } - var allNodes = FlattenAll(node); - foreach (var element in allNodes) - { - if (element.Index == index) { return element; } - } - throw new ArgumentOutOfRangeException(nameof(index)); - } - - /// - /// Flattens the entirety of a hierarchical structure representation into an sequence of nodes. - /// - /// The type of the instance represented by the specified in the hierarchical structure. - /// The node from which the flattening will begin. - /// An sequence of all nodes represented by the hierarchical structure. - /// - /// is null. - /// - public static IEnumerable> FlattenAll(this IHierarchy node) - { - Validator.ThrowIfNull(node, nameof(node)); - var root = AncestorsAndSelf(node).FirstOrDefault(); - return DescendantsAndSelf(root); - } - } -} \ No newline at end of file diff --git a/src/Cuemon.Core/Runtime/Serialization/HierarchySerializer.cs b/src/Cuemon.Core/Runtime/Serialization/HierarchySerializer.cs index 1e5471903..be77b88bf 100644 --- a/src/Cuemon.Core/Runtime/Serialization/HierarchySerializer.cs +++ b/src/Cuemon.Core/Runtime/Serialization/HierarchySerializer.cs @@ -16,7 +16,7 @@ public class HierarchySerializer /// The which need to be configured. public HierarchySerializer(object source, Action setup = null) { - Nodes = Hierarchy.GetObjectHierarchy(source, setup).Root(); + Nodes = Decorator.Enclose(Hierarchy.GetObjectHierarchy(source, setup)).Root(); } /// diff --git a/src/Cuemon.Xml/Serialization/Converters/DefaultXmlConverter.cs b/src/Cuemon.Xml/Serialization/Converters/DefaultXmlConverter.cs index 1f92d15b5..566aede4b 100644 --- a/src/Cuemon.Xml/Serialization/Converters/DefaultXmlConverter.cs +++ b/src/Cuemon.Xml/Serialization/Converters/DefaultXmlConverter.cs @@ -88,7 +88,7 @@ private object ParseReadXmlDictionary(XmlReader reader, Type valueType) { var values = new Dictionary(); var hierarchy = Decorator.Enclose(reader).ToHierarchy(); - var items = hierarchy.Find(h => h.Instance.Name == EnumerableElementName && h.Depth == 1).ToList(); + var items = Decorator.Enclose(hierarchy).Find(h => h.Instance.Name == EnumerableElementName && h.Depth == 1).ToList(); foreach (var item in items) { if (item.HasChildren) @@ -125,7 +125,7 @@ private object ParseReadXmlEnumerable(XmlReader reader, Type valueType) { var values = new List>(); var hierarchy = Decorator.Enclose(reader).ToHierarchy(); - var items = hierarchy.Find(h => h.Instance.Name == EnumerableElementName && h.Depth == 1).ToList(); + var items = Decorator.Enclose(hierarchy).Find(h => h.Instance.Name == EnumerableElementName && h.Depth == 1).ToList(); if (items.FirstOrDefault()?.HasChildren ?? false) { throw new NotSupportedException("Deserialization of complex objects is not supported in this version."); } values.AddRange(items.Select(h => new KeyValuePair(h.Instance.Name, h.Instance.Value.ToString()))); From a071a2fa9fb5268972199aaec03e118cdb949b37 Mon Sep 17 00:00:00 2001 From: gimlichael Date: Sun, 28 Feb 2021 18:51:02 +0100 Subject: [PATCH 3/7] Renamed group reference. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b1215f769..48831731c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,7 +13,7 @@ trigger: - README.md variables: - - group: Integration Test + - group: BuildSecrets - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE value: true - name: DOTNET_CLI_TELEMETRY_OPTOUT From 4bf4df55f88420b912cc9c6f4826c57f46d54a21 Mon Sep 17 00:00:00 2001 From: gimlichael Date: Sun, 28 Feb 2021 18:51:23 +0100 Subject: [PATCH 4/7] Updated Nuget release notes. --- .../Properties/PackageReleaseNotes.txt | 166 +++++++++++++++--- .../Properties/PackageReleaseNotes.txt | 4 +- 2 files changed, 148 insertions(+), 22 deletions(-) diff --git a/src/Cuemon.Core/Properties/PackageReleaseNotes.txt b/src/Cuemon.Core/Properties/PackageReleaseNotes.txt index dbaee21a1..7c6c66c23 100644 --- a/src/Cuemon.Core/Properties/PackageReleaseNotes.txt +++ b/src/Cuemon.Core/Properties/PackageReleaseNotes.txt @@ -5,12 +5,33 @@ Availability: NET Standard 2.0, NET 5.0 - To use the earlier built-in support for transient fault handling, please refer to the Cuemon.Resilience namespace, as it has been merged and refactored out of this assembly - To use the earlier built-in support for time-measuring and describing exceptions, please refer to the Cuemon.Diagnostics namespace, as it has been merged and refactored out of this assembly - To use the earlier built-in support for a computed checksum operation, please refer to the Cuemon.Data.Integrity namespace, as it has been merged and refactored out of this and the Cuemon.Integrity assembly -- Any former extension methods of the Cuemon namespace (and related) was either removed completely or merged into there respective Cuemon.Extensions.* namespace equivalent +- To use the earlier built-in support for I/O operations, please refer to the Cuemon.IO namespace, as it has been merged and refactored out of this assembly +- Any former extension methods of the Cuemon namespace (and related) was either removed completely or merged into their respective Cuemon.Extensions.* namespace equivalent +- The extent of refactoring applied to this project resulted in so many breaking changes that a git diff is advisable +- Parts of the deprecated Cuemon.Runtime assembly was merged and refactored into this assembly keeping its original namespace (Cuemon.Runtime) +- Parts of the deprecated Cuemon.Security assembly was merged and refactored into this assembly keeping its original namespace (Cuemon.Security)   # Breaking Changes - REMOVED StringFormatter class from the Cuemon namespace - REMOVED StandardizedDateTimeFormatPattern enum from the Cuemon namespace -- MOVED AsyncOptions class in the Cuemon.Threading namespace to its own assembly (by the same name and namespace) +- MOVED AsyncOptions class from the Cuemon.Threading namespace to its own assembly (by the same name and namespace) +- REMOVED ComparisonUtility class from the Cuemon.Collections.Generic namespace +- REMOVED DictionaryConverter class from the Cuemon.Collections.Generic namespace +- REMOVED DictionaryUtility class from the Cuemon.Collections.Generic namespace +- REMOVED EnumerableConverter class from the Cuemon.Collections.Generic namespace +- REMOVED EnumerableUtility class from the Cuemon.Collections.Generic namespace +- REMOVED ISortableTable interface from the Cuemon.Collections.Generic namespace +- REMOVED ListUtility class in from Cuemon.Collections.Generic namespace +- REMOVED PartitionCollection class from the Cuemon.Collections.Generic namespace +- REMOVED MethodBaseConverter class from the Cuemon.Reflection namespace +- REMOVED ReflectionUtility class from the Cuemon.Reflection namespace +- REMOVED JsonConverter class from the Cuemon.Runtime.Serialization namespace +- REMOVED JsonInstance class from the Cuemon.Runtime.Serialization namespace +- REMOVED JsonInstanceCollection class from the Cuemon.Runtime.Serialization namespace +- REMOVED JsonTextWriter class from the Cuemon.Runtime.Serialization namespace +- REMOVED JsonWriter class from the Cuemon.Runtime.Serialization namespace +- REMOVED EncodingConverter class from the Cuemon.Text namespace +- REMOVED EncodingUtility class from the Cuemon.Text namespace - REMOVED JsonWebToken class from the Cuemon.Security.Web namespace - REMOVED JsonWebTokenHashAlgorithm class from the Cuemon.Security.Web namespace - REMOVED JsonWebTokenHashAlgorithmConverter class from the Cuemon.Security.Web namespace @@ -21,33 +42,138 @@ Availability: NET Standard 2.0, NET 5.0 - REMOVED SecurityToken class from the Cuemon.Security namespace - REMOVED SecurityTokenSettings class from the Cuemon.Security namespace (replaced with SignedUriOptions in the Cuemon.Extensions.Net.Security namespace) - REMOVED SecurityUtility class from the Cuemon.Security namespace -- REMOVED AssemblyExtensions class from the Cuemon.Reflection namespace -- MOVED MemberInfoExtensions class from the Cuemon.Reflection namespace to Cuemon.Extensions.Reflection namespace -- REMOVED MethodBaseConverterExtensions class from the Cuemon.Reflection namespace -- MOVED LatencyException class in the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) -- MOVED TransientOperation class in the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) -- MOVED TransientFaultEvidence class in the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) -- MOVED TransientFaultException class in the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) -- MOVED TransientOperation class in the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) -- MOVED TransientOperationOptions class in the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) +- MOVED PreambleSequence enum from the Cuemon namespace to the Cuemon.Text namespace +- REMOVED ArgumentEmptyException class from the Cuemon namespace +- RENAMED AssignmentUtility class in the Cuemon namespace to Calculator +- REMOVED ByteConverter class from the Cuemon namespace +- REMOVED ByteUtility class from the Cuemon namespace +- REMOVED CharConverter class from the Cuemon namespace +- REMOVED ConditionBuilder class from the Cuemon namespace +- REMOVED Converter class from the Cuemon namespace +- REMOVED ConvertibleConverter class from the Cuemon namespace +- REMOVED DateTimeConverter class from the Cuemon namespace +- REMOVED DelegateUtility class from the Cuemon namespace +- REMOVED DoubleConverter class from the Cuemon namespace +- REMOVED EnumUtility class from the Cuemon namespace +- REMOVED EventUtility class from the Cuemon namespace +- REMOVED ExceptionUtility class from the Cuemon namespace +- REMOVED GuidConverter class from the Cuemon namespace +- REMOVED GuidUtility class from the Cuemon namespace +- REMOVED HierarchySerializer class from the Cuemon namespace +- REMOVED HierarchyUtility class from the Cuemon namespace +- REMOVED LoopUtility class from the Cuemon namespace +- REMOVED MethodWrappedException class from the Cuemon namespace +- REMOVED NumberUtility class from the Cuemon namespace +- REMOVED ObjectConverter class from the Cuemon namespace +- REMOVED RandomSeverity enum from the Cuemon namespace +- REMOVED StandardizedDateTimeFormatPattern enum from the Cuemon namespace +- REMOVED StringConverter class from the Cuemon namespace +- REMOVED StringFormatter class from the Cuemon namespace +- REMOVED StringUtility class from the Cuemon namespace +- REMOVED StructUtility class from the Cuemon namespace +- REMOVED TesterDoer class from the Cuemon namespace +- REMOVED TesterFuncUtility class from the Cuemon namespace +- REMOVED TimeSpanConverter class from the Cuemon namespace +- REMOVED TupleUtility class from the Cuemon namespace +- REMOVED TypeCodeConverter class from the Cuemon namespace +- REMOVED TypeUtility class from the Cuemon namespace +- REMOVED UriConverter class from the Cuemon namespace +- REMOVED UriUtility class from the Cuemon namespace +- REMOVED VersionUtility class from the Cuemon namespace +- MOVED LatencyException class from the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) +- MOVED TransientOperation class from the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) +- MOVED TransientFaultEvidence class from the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) +- MOVED TransientFaultException class from the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) +- MOVED TransientOperation class from the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) +- MOVED TransientOperationOptions class from the Cuemon namespace to its own assembly and namespace (Cuemon.Resilience) - REMOVED IMessageLocalizer interface from the Cuemon.Globalization namespace   # New Features - ADDED ResourceAttribute class in the Cuemon.Globalization namespace that provides a generic way to support localization on attribute decorated methods -- +- ADDED Arguments class in the Cuemon.Collections.Generic namespace that provides a set of static methods for both typing (no conversion) and converting a variable number of arguments into its equivalent T:object[], IEnumerable{T} and T:T[] +- ADDED EnumReadOnlyDictionary class in the Cuemon.Collections.Generic namespace that represents a read-only collection of key/value pairs that provides information about the specified TEnum +- ADDED PartitionerCollection class in the Cuemon.Collections.Generic namespace that represents a generic and read-only collection that is iterated in partitions +- ADDED PartitionerEnumerable class in the Cuemon.Collections.Generic namespace that exposes the enumerator, which supports iteration in partitions over a collection of a specified type +- ADDED HierarchySerializer class in the Cuemon.Runtime.Serialization namespace that provides a way to serialize objects to nodes of IHierarchy{T} +- ADDED Formatter class in the Cuemon.Runtime.Serialization.Formatters namespace that is an abstract class that supports serialization and deserialization of an object, in a given format +- ADDED CyclicRedundancyCheck64 class in the Cuemon.Security namespace that provides a CRC-64 implementation of the CRC (Cyclic Redundancy Check) checksum algorithm for 64-bit hash values +- ADDED CyclicRedundancyCheckAlgorithm enum in the Cuemon.Security namespace that provides different models of the CRC algorithm family +- ADDED CyclicRedundancyCheckOptions class in the Cuemon.Security namespace that specifies options related to CyclicRedundancyCheck +- ADDED FowlerNollVo1024 class in the Cuemon.Security namespace that provides an implementation of the FVN (Fowler–Noll–Vo) non-cryptographic hashing algorithm for 1024-bit hash values +- ADDED FowlerNollVo128 class in the Cuemon.Security namespace that provides an implementation of the FVN (Fowler–Noll–Vo) non-cryptographic hashing algorithm for 128-bit hash values +- ADDED FowlerNollVo256 class in the Cuemon.Security namespace that provides an implementation of the FVN (Fowler–Noll–Vo) non-cryptographic hashing algorithm for 256-bit hash values +- ADDED FowlerNollVo32 class in the Cuemon.Security namespace that provides an implementation of the FVN (Fowler–Noll–Vo) non-cryptographic hashing algorithm for 32-bit hash values +- ADDED FowlerNollVo512 class in the Cuemon.Security namespace that provides an implementation of the FVN (Fowler–Noll–Vo) non-cryptographic hashing algorithm for 512-bit hash values +- ADDED FowlerNollVo64 class in the Cuemon.Security namespace that provides an implementation of the FVN (Fowler–Noll–Vo) non-cryptographic hashing algorithm for 64-bit hash values +- ADDED FowlerNollVoAlgorithm enum in the Cuemon.Security namespace that defines the algorithms of the Fowler-Noll-Vo hash function +- ADDED FowlerNollVoHash class in the Cuemon.Security namespace that represents the base class from which all implementations of the Fowler–Noll–Vo non-cryptographic hashing algorithm must derive +- ADDED FowlerNollVoOptions class in the Cuemon.Security namespace that specifies options related to FowlerNollVoHash +- ADDED Hash class in the Cuemon.Security namespace that represents the base class from which all implementations of hash algorithms and checksums should derive +- ADDED HashFactory class in the Cuemon.Security namespace that provides access to factory methods for creating and configuring Hash instances +- ADDED IHash interface in the Cuemon.Security namespace that defines the bare minimum of both non-cryptographic and cryptographic transformations +- ADDED NonCryptoAlgorithm enum in the Cuemon.Security namespace that specifies the different implementations of a non-cryptographic hashing algorithm +- ADDED ByteOrderMark class in the Cuemon.Text namespace that provides a set of static methods for Unicode related operations +- ADDED EnumStringOptions class in the Cuemon.Text namespace that specifies options related to ParserFactory.FromEnum +- ADDED GuidStringOptions class in the Cuemon.Text namespace that specifies options related to ParserFactory.FromGuid +- ADDED IConfigurableParser interface in the Cuemon.Text namespace that defines methods that converts a string to an object of a particular type having a way to configure the input +- ADDED IEncodingOptions interface in the Cuemon.Text namespace that defines configuration options for Encoding +- ADDED IParser interface in the Cuemon.Text namespace that defines methods that converts a string to an object of a particular type +- ADDED ParserFactory class in the Cuemon.Text namespace that provides access to factory methods that are tailored for parsing operations adhering IParser and IConfigurableParser{TOptions} +- ADDED ProtocolRelativeUriStringOptions class in the Cuemon.Text namespace that specifies options related to ParserFactory.FromProtocolRelativeUri +- ADDED Stem class in the Cuemon.Text namespace that provides a way to support assigning a stem to a value +- ADDED UriStringOptions class in the Cuemon.Text namespace that specifies options related to ParserFactory.FromUri +- ADDED Alphanumeric class in the Cuemon namespace that provides a set of alphanumeric constant and static fields that consists of both letters, numbers and other symbols (such as punctuation marks and mathematical symbols) +- ADDED BinaryPrefix class in the Cuemon namespace that defines a binary unit prefix for multiples of measurement for data that refers strictly to powers of 2 +- ADDED BitMultipleTable class in the Cuemon namespace that represent a table of both binary and metric prefixes for a BitUnit +- ADDED BitUnit class in the Cuemon namespace that represents a unit of measurement for bits and is used with measurement of data +- ADDED ByteMultipleTable class in the Cuemon namespace that represent a table of both binary and metric prefixes for a ByteUnit +- ADDED ByteMultipleTable class in the Cuemon namespace that represents a unit of measurement for bytes and is used with measurement of data +- ADDED Convertible class in the Cuemon namespace that provides a set of static methods, suitable for verifying integrity of data, that convert IConvertible implementations to and from a sequence of bytes +- ADDED ConvertibleConverterDictionary class in the Cuemon namespace that represents a collection of function delegates that converts an IConvertible implementation to its T:byte[] equivalent +- ADDED ConvertibleOptions class in the Cuemon namespace that specifies options related to Convertible +- ADDED DecimalPrefix class in the Cuemon namespace that defines a decimal (metric) unit prefix for multiples and submultiples of measurement that refers strictly to powers of 10 +- ADDED Decorator class in the Cuemon namespace that provides a way to dynamically enclose/wrap an object to support the decorator pattern +- ADDED DelimitedString class in the Cuemon namespace that provides a set of static methods to convert a sequence into a delimited string and break a delimited string into substrings +- ADDED DelimitedStringOptions class in the Cuemon namespace that specifies options related to DelimitedString.Split +- ADDED Disposable class in the Cuemon namespace that provides a mechanism for releasing both managed and unmanaged resources with focus on the former +- ADDED DisposableOptions class in the Cuemon namespace that specifies options related to Disposable +- ADDED EndianOptions class in the Cuemon namespace that specifies options related to BitConverter +- ADDED Endianness class in the Cuemon namespace that defines the order in which a sequence of bytes are represented +- ADDED Eradicate class in the Cuemon namespace that provides a set of static methods for eradicating different types of values or sequences of values +- ADDED ExceptionCondition class in the Cuemon namespace that provides a fluent and generic way to setup a condition for raising an Exception +- ADDED ExceptionInsights class in the Cuemon namespace that provides a set of static methods for embedding environment specific insights to an exception +- ADDED FinalizeDisposable class in the Cuemon namespace that provides a mechanism for releasing both managed and unmanaged resources with focus on the latter +- ADDED FormattingOptions class in the Cuemon namespace that specifies options related to IFormatProvider +- ADDED Generate class in the Cuemon namespace that provides a set of static methods for generating different types of values or sequences of values +- ADDED GuidFormats enum in the Cuemon namespace that specifies allowed GUID formats in parsing related methods +- ADDED IDecorator interface in the Cuemon namespace that defines a decorator that exposes the inner decorated type +- ADDED IPrefixMultiple interface in the Cuemon namespace that defines a unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement +- ADDED IUnit interface in the Cuemon namespace that defines a unit of measurement that is used as a standard for measurement of the same kind of quantity +- ADDED MultipleTable class in the Cuemon namespace that defines a unit of measurement that provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure to indicate a multiple of the unit +- ADDED MultipleTableOptions class in the Cuemon namespace that specifies options related to MultipleTable +- ADDED NamingStyle enum in the Cuemon namespace that specifies ways that a string must be represented in terms of naming style +- ADDED ObjectFormattingOptions class in the Cuemon namespace that specifies options related to ParserFactory.FromObject +- ADDED ObjectPortrayalOptions class in the Cuemon namespace that specifies options related to Generate.ObjectPortrayal +- ADDED Patterns class in the Cuemon namespace that provides a generic way to support different types of design patterns and practices with small utility methods +- ADDED StringFactory class in the Cuemon namespace that provides access to factory methods for creating and configuring encoded string instances +- ADDED SystemSnapshot enum in the Cuemon namespace that specifies the system states to capture runtime +- ADDED UnitFormatOptions class in the Cuemon namespace that specifies options related to BitUnit and ByteUnit +- ADDED UnitPrefix class in the Cuemon namespace that specifies the two standards for binary multiples and decimal multiples +- ADDED UnitPrefixFormatter class in the Cuemon namespace that defines the string formatting of objects having an implementation of either IPrefixUnit or IUnit   # Bug Fixes -- -- +- Several ;-)   # Improvements -- -- +- CHANGED HashResult class in the Cuemon.Security namespace to implement IEquatable{HashResult} as well as other improvements +- EXTENDED Condition class in the Cuemon namespace with several new static members: Query, IsEnum, IsProtocolRelativeUrl, IsUri, HasConsecutiveCharacters, IsBase64, IsBinaryDigits, IsPrime, IsEven, IsOdd, IsCountableSequence (Query makes this class extensible - enabling you to write your own conditions) +- REFACTORED TaskActionFactory class in the Cuemon namespace to have CancellationToken support +- REFACTORED TaskFuncFactory class in the Cuemon namespace to have CancellationToken support +- EXTENDED Validator class in the Cuemon namespace with several new static members: ThrowIf, ThrowWhenCondition, ThrowIfNumber, ThrowIfNotNumber, ThrowIfNull, ThrowIfSequenceEmpty, ThrowIfEmpty, ThrowIfContainsInterface, ThrowIfNotContainsInterface, ThrowIfNotContainsType, ThrowIfEnumType, ThrowIfNotBinaryDigits, ThrowIfNotBase64String, ThrowIfTrue, ThrowIfFalse, ThrowIfSequenceNullOrEmpty   # Quality Actions -- -- +- Several ;-)   # Other Changes -- -- \ No newline at end of file +- Several ;-) +  \ No newline at end of file diff --git a/src/Cuemon.Security.Cryptography/Properties/PackageReleaseNotes.txt b/src/Cuemon.Security.Cryptography/Properties/PackageReleaseNotes.txt index d25ffd286..8fef02342 100644 --- a/src/Cuemon.Security.Cryptography/Properties/PackageReleaseNotes.txt +++ b/src/Cuemon.Security.Cryptography/Properties/PackageReleaseNotes.txt @@ -10,8 +10,8 @@ Availability: NET Standard 2.0, NET 5.0 # Breaking Changes - REPLACED AdvancedEncryptionStandardKeySize enum in the Cuemon.Security.Cryptography namespace with AesSize - REMOVED AdvancedEncryptionStandardUtility class from the Cuemon.Security.Cryptography namespace -- REMOVED CyclicRedundancyCheck class from the Cuemon.Security.Cryptography namespace -- REMOVED CyclicRedundancyCheck32 class from the Cuemon.Security.Cryptography namespace +- MOVED CyclicRedundancyCheck class to the Cuemon.Security namespace +- MOVED CyclicRedundancyCheck32 class to the Cuemon.Security namespace - REPLACED HashAlgorithmType enum in the Cuemon.Security.Cryptography namespace with UnkeyedCryptoAlgorithm - REMOVED HashOptions class from the Cuemon.Security.Cryptography namespace - MOVED HashResult class to the Cuemon.Security namespace From 08f535748314e66e7e7ce5a0f81b6b93f7256c5d Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 28 Feb 2021 19:52:36 +0100 Subject: [PATCH 5/7] Trigger exclusion --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 48831731c..55b9b5da0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,6 +4,7 @@ trigger: - development paths: exclude: + - .github/ - docfx/ - azure-pipelines.yml - BuildDocfxImage.ps1 From 01b9bdb46c263f4d960c06c67ebd1545ab188786 Mon Sep 17 00:00:00 2001 From: gimlichael Date: Sun, 28 Feb 2021 20:26:30 +0100 Subject: [PATCH 6/7] Added and Updated markdown files. --- .github/CODE_OF_CONDUCT.md | 135 +++++++++++++++++++++++++++++++++++++ .github/CONTRIBUTING.md | 35 ++++++++++ README.md | 117 +++++++++++++++++++++----------- 3 files changed, 249 insertions(+), 38 deletions(-) create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..e27edb407 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,135 @@ +# Contributor Covenant Code of Conduct + +This document is adapted from the Contributor Covenant which is used by many open source projects, +including those under the [.NET Foundation](https://dotnetfoundation.org/code-of-conduct). + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[INSERT CONTACT METHOD]. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 000000000..965d39933 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contributing to Cuemon for .NET +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Code of Conduct +Please review our [code of conduct](.github/CODE_OF_CONDUCT.md). + +## Our Development Process +We use GitHub with a simple GitFlow inspired flow. +All new features and/or fixes are merged into the `development` branch by creating a Pull Request. + +## Pull Requests +We actively welcome your pull requests. + +1. Fork the repo and create your branch from `development` +2. If you've added code that should be tested, add tests (DO follow [Microsoft Engineering Guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines)) +3. Any changes or additions requires documentation in the form of documenting public members +4. Ensure that all existing as well as new test passes +5. Issue that pull request with a big and heartful thanks for contributing + +## Issues +We use GitHub issues to track public bugs. Please ensure your description is +clear and has sufficient instructions to be able to reproduce the issue. + +## Coding Guidelines +* Please follow Framework Design Guidelines +* Please follow SOLID principles +* Let yourself be inspired by [Microsoft Engineering Guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines) +* Consider reading my short take on [Software craftsmanship - a journey with inspirational sources!](https://github.com/gimlichael/Must-Read-Resources) + +## License +By contributing to Cuemon for .NET, you agree that your contributions will be licensed +under the MIT license. \ No newline at end of file diff --git a/README.md b/README.md index 9d5cd658d..dac651b18 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ # Cuemon for .NET -An open-source project (MIT license) that targets and complements the Microsoft .NET platform. It provides vast ways of possibilities for all breeds of coders, programmers, developers and the likes thereof. Ideal for .NET, .NET Standard, .NET Core, Universal Windows Platform and .NET Framework 4.6.1 and newer. +An open-source project (MIT license) that targets and complements the Microsoft .NET platform. It provides vast ways of possibilities for all breeds of coders, programmers, developers and the likes thereof. +Your ideal companion for .NET 5, .NET Core 3, .NET Core 2, .NET Standard 2.1, .NET Standard 2, Universal Windows Platform and .NET Framework 4.6.1 and newer. It is, by heart, free, flexible and built to extend and boost your agile codebelt. @@ -19,9 +20,9 @@ All CI and CD integrations are done on [Microsoft Azure DevOps](https://azure.mi All code quality analysis are done by [SonarCloud](https://sonarcloud.io/) and [CodeCov.io](https://codecov.io/). -Currently work is done on ironing out the kinks in relations to NuGet package description, release notes conventions, concepts and last minute refactorings to provide the best experience possible with RC-1! +Currently work is done on ironing out the kinks in relations to NuGet package description, release notes conventions, concepts and last minute refactorings to provide the best experience possible with the RCs! -![License](https://img.shields.io/github/license/gimlichael/cuemon) [![Build Status](https://dev.azure.com/gimlichael/Cuemon/_apis/build/status/gimlichael.Cuemon?branchName=development)](https://dev.azure.com/gimlichael/Cuemon/_build/latest?definitionId=9&branchName=development) [![codecov](https://codecov.io/gh/gimlichael/Cuemon/branch/development/graph/badge.svg)](https://codecov.io/gh/gimlichael/Cuemon) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=coverage)](https://sonarcloud.io/dashboard?id=Cuemon) +![License](https://img.shields.io/github/license/gimlichael/cuemon) [![Build Status](https://dev.azure.com/gimlichael/Cuemon/_apis/build/status/gimlichael.Cuemon?branchName=development)](https://dev.azure.com/gimlichael/Cuemon/_build/latest?definitionId=9&branchName=development) [![codecov](https://codecov.io/gh/gimlichael/Cuemon/branch/development/graph/badge.svg)](https://codecov.io/gh/gimlichael/Cuemon) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=coverage)](https://sonarcloud.io/dashboard?id=Cuemon) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md) ## Development Branch @@ -66,40 +67,80 @@ Builds performed from this repository are pushed to NuGet.org as the actual vers [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=ncloc)](https://sonarcloud.io/dashboard?id=Cuemon) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=code_smells)](https://sonarcloud.io/dashboard?id=Cuemon) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=sqale_index)](https://sonarcloud.io/dashboard?id=Cuemon) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=bugs)](https://sonarcloud.io/dashboard?id=Cuemon) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=Cuemon) [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=Cuemon) +# Contributing to Cuemon for .NET + +A big welcome and thank you for considering contributing to Cuemon for .NET open source project! + +Please read more about [contributing to Cuemon for .NET](.github/CONTRIBUTING.md). + +# Code of Conduct + +Project maintainers pledge to foster an open and welcoming environment, and ask contributors to do the same. + +For more information see our [code of conduct](.github/CODE_OF_CONDUCT.md). + + +## Links to NuGet packages (will be updated once Cuemon for .NET has shipped in 6.0.0) + +NuGet links for this project: + +* [Cuemon.AspNetCore](https://www.nuget.org/packages/Cuemon.AspNetCore/) +* [Cuemon.AspNetCore.Authentication](https://www.nuget.org/packages/Cuemon.AspNetCore.Authentication/) +* [Cuemon.AspNetCore.Mvc](https://www.nuget.org/packages/Cuemon.AspNetCore.Mvc/) +* ~~Cuemon.AspNetCore.Mvc.Formatters.Json~~ +* ~~Cuemon.AspNetCore.Mvc.Formatters.Xml~~ +* [Cuemon.AspNetCore.Razor.TagHelpers](https://www.nuget.org/packages/Cuemon.AspNetCore.Razor.TagHelpers/) +* ~~Cuemon.Collections.Specialized~~ +* [Cuemon.Core](https://www.nuget.org/packages/Cuemon.Core/) +* [Cuemon.Data](https://www.nuget.org/packages/Cuemon.Data/) +* [Cuemon.Data.Integrity](https://www.nuget.org/packages/Cuemon.Data.Integrity/) +* [Cuemon.Data.SqlClient](https://www.nuget.org/packages/Cuemon.Data.SqlClient/) +* ~~Cuemon.Data.XmlClient~~ +* [Cuemon.Diagnostics](https://www.nuget.org/packages/Cuemon.Diagnostics/) +* [Cuemon.Extensions.AspNetCore](https://www.nuget.org/packages/Cuemon.Extensions.AspNetCore/) +* [Cuemon.Extensions.AspNetCore.Authentication](https://www.nuget.org/packages/Cuemon.Extensions.AspNetCore.Authentication/) +* [Cuemon.Extensions.AspNetCore.Mvc](https://www.nuget.org/packages/Cuemon.Extensions.AspNetCore.Mvc/) +* [Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json](https://www.nuget.org/packages/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/) +* [Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml](https://www.nuget.org/packages/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/) +* [Cuemon.Extensions.Collections.Generic](https://www.nuget.org/packages/Cuemon.Extensions.Collections.Generic/) +* [Cuemon.Extensions.Collections.Specialized](https://www.nuget.org/packages/Cuemon.Extensions.Collections.Specialized/) +* [Cuemon.Extensions.Core](https://www.nuget.org/packages/Cuemon.Extensions.Core/) +* [Cuemon.Extensions.Data](https://www.nuget.org/packages/Cuemon.Extensions.Data/) +* [Cuemon.Extensions.Data.Integrity](https://www.nuget.org/packages/Cuemon.Extensions.Data.Integrity/) +* [Cuemon.Extensions.DependencyInjection](https://www.nuget.org/packages/Cuemon.Extensions.DependencyInjection/) +* [Cuemon.Extensions.Diagnostics](https://www.nuget.org/packages/Cuemon.Extensions.Diagnostics/) +* [Cuemon.Extensions.Hosting](https://www.nuget.org/packages/Cuemon.Extensions.Hosting/) +* [Cuemon.Extensions.IO](https://www.nuget.org/packages/Cuemon.Extensions.IO/) +* [Cuemon.Extensions.Net](https://www.nuget.org/packages/Cuemon.Extensions.Net/) +* [Cuemon.Extensions.Newtonsoft.Json](https://www.nuget.org/packages/Cuemon.Extensions.Newtonsoft.Json/) +* [Cuemon.Extensions.Reflection](https://www.nuget.org/packages/Cuemon.Extensions.Reflection/) +* [Cuemon.Extensions.Runtime.Caching](https://www.nuget.org/packages/Cuemon.Extensions.Runtime.Caching/) +* [Cuemon.Extensions.Text](https://www.nuget.org/packages/Cuemon.Extensions.Text/) +* [Cuemon.Extensions.Threading](https://www.nuget.org/packages/Cuemon.Extensions.Threading/) +* [Cuemon.Extensions.Xml](https://www.nuget.org/packages/Cuemon.Extensions.Xml/) +* [Cuemon.Extensions.Xunit](https://www.nuget.org/packages/Cuemon.Extensions.Xunit/) +* [Cuemon.Extensions.Xunit.Hosting](https://www.nuget.org/packages/Cuemon.Extensions.Xunit.Hosting/) +* [Cuemon.Extensions.Xunit.Hosting.AspNetCore](https://www.nuget.org/packages/Cuemon.Extensions.Xunit.Hosting.AspNetCore/) +* [Cuemon.Extensions.Xunit.Hosting.AspNetCore.Mvc](https://www.nuget.org/packages/Cuemon.Extensions.Xunit.Hosting.AspNetCore.Mvc/) +* ~~Cuemon.Integrity~~ +* [Cuemon.IO](https://www.nuget.org/packages/Cuemon.IO/) +* [Cuemon.Net](https://www.nuget.org/packages/Cuemon.Net/) +* ~~Cuemon.Net.Mail~~ +* ~~Cuemon.Reflection~~ +* [Cuemon.Resilience](https://www.nuget.org/packages/Cuemon.Resilience/) +* ~~Cuemon.Runtime~~ +* [Cuemon.Runtime.Caching](https://www.nuget.org/packages/Cuemon.Runtime.Caching/) +* ~~Cuemon.Security~~ +* [Cuemon.Security.Cryptography](https://www.nuget.org/packages/Cuemon.Security.Cryptography/) +* ~~Cuemon.Serialization~~ +* ~~Cuemon.Serialization.Json~~ +* ~~Cuemon.Serialization.Xml~~ +* [Cuemon.Threading](https://www.nuget.org/packages/Cuemon.Threading/) +* ~~Cuemon.Web~~ +* [Cuemon.Xml](https://www.nuget.org/packages/Cuemon.Xml/) + + +These will be updated to the current version ASAP to get you started out easy. - -### Links to NuGet packages (will be updated once Cuemon for .NET has shipped in 6.0.0) - -Useful links for this project (will soon be changed for the forthcoming release): - -* [Cuemon .NET Standard](http://www.cuemon.net/) * Cuemon .NET Standard Package on [Nuget](https://www.nuget.org/packages/Cuemon.Core.Package/) -* Cuemon ASP.NET Core Package on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Package/) -* Cuemon.AspNetCore on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore/) -* Cuemon.AspNetCore.Authentication on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Authentication/) -* Cuemon.AspNetCore.Mvc on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Mvc/) -* Cuemon.AspNetCore.Mvc.Formatters.Json on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Mvc.Formatters.Json/) -* Cuemon.AspNetCore.Mvc.Formatters.Xml on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Mvc.Formatters.Xml/) -* Cuemon.Collections.Specialized on [Nuget](https://www.nuget.org/packages/Cuemon.Collections.Specialized/) -* Cuemon.Core on [Nuget](https://www.nuget.org/packages/Cuemon.Core/) -* Cuemon.Data on [Nuget](https://www.nuget.org/packages/Cuemon.Data/) -* Cuemon.Data.XmlClient on [Nuget](https://www.nuget.org/packages/Cuemon.Data.XmlClient/) -* Cuemon.Integrity on [Nuget](https://www.nuget.org/packages/Cuemon.Integrity/) -* Cuemon.IO on [Nuget](https://www.nuget.org/packages/Cuemon.IO/) -* Cuemon.Net on [Nuget](https://www.nuget.org/packages/Cuemon.Net/) -* Cuemon.Net.Mail on [Nuget](https://www.nuget.org/packages/Cuemon.Net.Mail/) -* Cuemon.Reflection on [Nuget](https://www.nuget.org/packages/Cuemon.Reflection/) -* Cuemon.Runtime on [Nuget](https://www.nuget.org/packages/Cuemon.Runtime/) -* Cuemon.Runtime.Caching on [Nuget](https://www.nuget.org/packages/Cuemon.Runtime.Caching/) -* Cuemon.Security on [Nuget](https://www.nuget.org/packages/Cuemon.Security/) -* Cuemon.Serialization on [Nuget](https://www.nuget.org/packages/Cuemon.Serialization/) -* Cuemon.Serialization.Json on [Nuget](https://www.nuget.org/packages/Cuemon.Serialization.Json/) -* Cuemon.Serialization.Xml on [Nuget](https://www.nuget.org/packages/Cuemon.Serialization.Xml/) -* Cuemon.Threading on [Nuget](https://www.nuget.org/packages/Cuemon.Threading/) -* Cuemon.Web on [Nuget](https://www.nuget.org/packages/Cuemon.Web/) -* Cuemon.Xml on [Nuget](https://www.nuget.org/packages/Cuemon.Xml/) - -* My profile on [LinkedIn](http://dk.linkedin.com/in/gimlichael) -* My profile on [Twitter](https://twitter.com/gimlichael) -* My profile on [StackOverflow](http://stackoverflow.com/users/175073/michael-mortensen) -* My [blog](http://www.cuemon.net/blog/) +* Cuemon ASP.NET Core Package on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Package/) \ No newline at end of file From d03e0da40bf353b192dc6738292911ba9e61291f Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 28 Feb 2021 20:44:14 +0100 Subject: [PATCH 7/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dac651b18..17d7e62b8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ All code quality analysis are done by [SonarCloud](https://sonarcloud.io/) and [ Currently work is done on ironing out the kinks in relations to NuGet package description, release notes conventions, concepts and last minute refactorings to provide the best experience possible with the RCs! -![License](https://img.shields.io/github/license/gimlichael/cuemon) [![Build Status](https://dev.azure.com/gimlichael/Cuemon/_apis/build/status/gimlichael.Cuemon?branchName=development)](https://dev.azure.com/gimlichael/Cuemon/_build/latest?definitionId=9&branchName=development) [![codecov](https://codecov.io/gh/gimlichael/Cuemon/branch/development/graph/badge.svg)](https://codecov.io/gh/gimlichael/Cuemon) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=coverage)](https://sonarcloud.io/dashboard?id=Cuemon) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md) +![License](https://img.shields.io/github/license/gimlichael/cuemon) [![Build Status](https://dev.azure.com/gimlichael/Cuemon/_apis/build/status/gimlichael.Cuemon?branchName=development)](https://dev.azure.com/gimlichael/Cuemon/_build/latest?definitionId=9&branchName=development) [![codecov](https://codecov.io/gh/gimlichael/Cuemon/branch/development/graph/badge.svg)](https://codecov.io/gh/gimlichael/Cuemon) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Cuemon&metric=coverage)](https://sonarcloud.io/dashboard?id=Cuemon) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](.github/CODE_OF_CONDUCT.md) ## Development Branch @@ -143,4 +143,4 @@ NuGet links for this project: These will be updated to the current version ASAP to get you started out easy. * Cuemon .NET Standard Package on [Nuget](https://www.nuget.org/packages/Cuemon.Core.Package/) -* Cuemon ASP.NET Core Package on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Package/) \ No newline at end of file +* Cuemon ASP.NET Core Package on [Nuget](https://www.nuget.org/packages/Cuemon.AspNetCore.Package/)