-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrated to 18.6.0
- Loading branch information
Showing
51 changed files
with
312 additions
and
234 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="CommandLineParser" Version="2.9.1" /> | ||
<PackageVersion Include="FluentAssertions" Version="6.11.0" /> | ||
<PackageVersion Include="FluentMigrator" Version="3.3.2" /> | ||
<PackageVersion Include="FluentMigrator.Runner" Version="3.3.2" /> | ||
<PackageVersion Include="FluentNHibernate" Version="3.2.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.BLL" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.BLLCore" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.Core" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.Dal" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.Domain" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.Dto" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.Sdk" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.App.ServiceEnvironment" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Authorization.BLL.Core" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Authorization.WebApi" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.AutomationCore.ServiceEnvironment" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Cap" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Configuration.Generated.DTO" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Configuration.WebApi" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Core" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Core.AnonymousTypeBuilder" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.BLL" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.BLL.Security" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.DBGenerator" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.NHibernate" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.NHibernate.DALGenerator" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.ProjectionGenerator" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.ServiceModel" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.ServiceModel.IAD" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.ServiceModel.IAD.DTO" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.ServiceModelGenerator" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.WebApiGenerator.NetCore" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.DomainDriven.WebApiNetCore" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.ExpressionParsers" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.NotificationCore" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.Security" Version="18.6.0" /> | ||
<PackageVersion Include="Luxoft.Framework.WebApi.Utils" Version="18.6.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.5" /> | ||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> | ||
<PackageVersion Include="Microsoft.SqlServer.SqlManagementObjects" Version="170.13.0" /> | ||
<PackageVersion Include="MSTest.TestAdapter" Version="3.0.2" /> | ||
<PackageVersion Include="MSTest.TestFramework" Version="3.0.2" /> | ||
<PackageVersion Include="nuSpec.NHibernate" Version="1.3.0" /> | ||
<PackageVersion Include="Serilog.Sinks.Console" Version="4.1.0" /> | ||
<PackageVersion Include="Serilog.Sinks.Graylog" Version="2.3.0" /> | ||
<PackageVersion Include="System.Drawing.Common" Version="7.0.0" /> | ||
</ItemGroup> | ||
</Project> |
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
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
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
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
22 changes: 22 additions & 0 deletions
22
src/_Workflow/Framework.Workflow.Core/Extensions/ArrayExtensions.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.IO; | ||
|
||
namespace Framework.Workflow.Core.Extensions; | ||
|
||
public static class ArrayExtensions | ||
{ | ||
public static Type GetElementType(this Array array) | ||
{ | ||
if (array == null) throw new ArgumentNullException(nameof(array)); | ||
|
||
return array.GetType().GetElementType(); | ||
} | ||
|
||
public static MemoryStream ToMemoryStream([NotNull] this byte[] source) | ||
{ | ||
if (source == null) throw new ArgumentNullException(nameof(source)); | ||
|
||
return new MemoryStream(source); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/_Workflow/Framework.Workflow.Core/Extensions/CoreEnumerableExtensions.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
using Framework.Core; | ||
|
||
namespace Framework.Workflow.Core.Extensions; | ||
|
||
public static class CoreEnumerableExtensions | ||
{ | ||
public static bool HasDuplicates<T>(this IEnumerable<T> source, IEqualityComparer<T> comparer = null) | ||
{ | ||
if (source == null) throw new ArgumentNullException(nameof(source)); | ||
|
||
return source.GetDuplicates(comparer).Any(); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/_Workflow/Framework.Workflow.Core/Extensions/CoreObjectExtensions.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
using Framework.Core; | ||
|
||
namespace Framework.Workflow.Core.Extensions; | ||
|
||
public static class CoreObjectExtensions | ||
{ | ||
public static Dictionary<string, object> ToPropertyDictionary( | ||
this object source, | ||
Func<string, string> propertyNameSelector = null) | ||
{ | ||
if (source == null) throw new ArgumentNullException(nameof(source)); | ||
|
||
var request = from property in source.GetType().GetProperties() | ||
where !property.GetIndexParameters().Any() | ||
let name = propertyNameSelector == null ? property.Name : propertyNameSelector(property.Name) | ||
select name.ToKeyValuePair(property.GetValue(source, Array.Empty<object>())); | ||
|
||
return request.ToDictionary(); | ||
} | ||
|
||
public static KeyValuePair<TKey, TValue> ToKeyValuePair<TKey, TValue>(this TKey key, TValue value) | ||
{ | ||
return new KeyValuePair<TKey, TValue>(key, value); | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Framework.Workflow.Core; | ||
|
||
public interface INamedCollection<out T> : IEnumerable<T> | ||
{ | ||
T this[string name] { get; } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
|
||
using Framework.Core; | ||
|
||
namespace Framework.Workflow.Core; | ||
|
||
public class NamedCollection<T> : ReadOnlyCollection<T>, INamedCollection<T> | ||
{ | ||
private readonly Func<T, string> _getName; | ||
|
||
public NamedCollection(IEnumerable<T> list, Func<T, string> getName) | ||
: base(list.ToList()) | ||
{ | ||
if (getName == null) throw new ArgumentNullException(nameof(getName)); | ||
|
||
this._getName = getName; | ||
} | ||
|
||
|
||
protected virtual IEqualityComparer<string> NameComparer | ||
{ | ||
get { return StringComparer.CurrentCultureIgnoreCase; } | ||
} | ||
|
||
|
||
public T this[string name] | ||
{ | ||
get | ||
{ | ||
return this.Where(item => this.NameComparer.Equals(this._getName(item), name)) | ||
.Single(() => new Exception($"{typeof(T).Name} with name \"{name}\" not found"), | ||
() => new Exception($"To many {typeof(T).Name} elements with name \"{name}\"")); | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.