Skip to content

Commit

Permalink
Akomashko/move to fw18.6.0 (#10)
Browse files Browse the repository at this point in the history
* migrated to 18.6.0
  • Loading branch information
komazzz committed May 5, 2023
1 parent 74d5a79 commit 82ece90
Show file tree
Hide file tree
Showing 51 changed files with 312 additions and 234 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build+unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Restore dependencies
working-directory: ./src
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Set up SqlServer
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Restore dependencies
working-directory: ./src
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Set up JDK 11
uses: actions/setup-java@v1
Expand Down
6 changes: 3 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<Project>
<!-- Package settings -->
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Luxoft 2009-2022</Copyright>
<Copyright>Luxoft 2009-2023</Copyright>
<Authors>Luxoft BSS</Authors>
<RepositoryUrl>https://github.com/Luxoft/BSSFramework.Workflow</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
54 changes: 54 additions & 0 deletions src/Directory.Packages.props
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>
4 changes: 2 additions & 2 deletions src/Framework.Graphviz/Framework.Graphviz.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Drawing.Common"/>

<PackageReference Include="Luxoft.Framework.Core" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.Core"/>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/IAD.Framework.WF.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__SolutionItems", "__Soluti
.editorconfig = .editorconfig
__SolutionItems\CommonAssemblyInfo.cs = __SolutionItems\CommonAssemblyInfo.cs
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
Settings.StyleCop = Settings.StyleCop
EndProjectSection
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Luxoft.Framework.Core.AnonymousTypeBuilder" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.Authorization.BLL.Core" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.ExpressionParsers" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.Core.AnonymousTypeBuilder"/>
<PackageReference Include="Luxoft.Framework.Authorization.BLL.Core"/>
<PackageReference Include="Luxoft.Framework.ExpressionParsers"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Framework.Exceptions;
using Framework.Persistent;
using Framework.SecuritySystem;
using Framework.Workflow.Core.Extensions;
using Framework.Workflow.Domain;
using Framework.Workflow.Domain.Definition;
using Framework.Workflow.Domain.Runtime;
Expand Down
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);
}
}
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();
}
}
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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Luxoft.Framework.Security" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.Security" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions src/_Workflow/Framework.Workflow.Core/INamedCollection.cs
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; }
}
38 changes: 38 additions & 0 deletions src/_Workflow/Framework.Workflow.Core/NamedCollection.cs
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}\""));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Framework.Core;
using Framework.Workflow.Core;

namespace Framework.Workflow
{
Expand All @@ -18,4 +18,4 @@ public interface IRestrictedWofkflowInstanceCollection<out TRestrictedWofkflowIn

bool AnyAborted { get; }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Framework.Core;
using Framework.Workflow.Core;

namespace Framework.Workflow
{
Expand All @@ -15,4 +15,4 @@ public interface IRestrictedWofkflowInstance

INamedCollection<string> Parameters { get; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using Framework.Restriction;
using Framework.Validation;
using Framework.Workflow.Core.Extensions;

namespace Framework.Workflow.Domain
{
Expand Down Expand Up @@ -38,4 +39,4 @@ public IEnumerable<ExecuteCommandRequest> Split()
select request;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Luxoft.Framework.DomainDriven.BLL.Security" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.DomainDriven.BLL" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.DomainDriven.BLL.Security" />
<PackageReference Include="Luxoft.Framework.DomainDriven.BLL" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
using System.Collections.Generic;
using System.Linq;

using Framework.Core;
using Framework.DomainDriven;
using Framework.DomainDriven.BLL;
using Framework.DomainDriven.Serialization;
using Framework.Persistent;
using Framework.Restriction;
using Framework.Workflow.Core;

namespace Framework.Workflow.Domain.Runtime
{
Expand Down Expand Up @@ -188,4 +188,4 @@ public bool AnyStates(string stateName)
// get { return this.Tasks.SelectMany(task => task.Assignees).Distinct(v => v.Login); }
//}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Framework.Exceptions;
using Framework.Persistent;
using Framework.Restriction;
using Framework.Workflow.Core;

namespace Framework.Workflow.Domain.Runtime
{
Expand Down Expand Up @@ -368,4 +369,4 @@ bool IRestrictedWofkflowInstance.IsFinished
get { return this.Watchers; }
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Luxoft.Framework.DomainDriven.ServiceModel" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.DomainDriven.ServiceModel.IAD" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.DomainDriven.WebApiNetCore" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.DomainDriven.ServiceModel" />
<PackageReference Include="Luxoft.Framework.DomainDriven.ServiceModel.IAD" />
<PackageReference Include="Luxoft.Framework.DomainDriven.WebApiNetCore" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Luxoft.Framework.DomainDriven.NHibernate" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.DomainDriven.NHibernate" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Luxoft.Framework.DomainDriven.ServiceModel.IAD.DTO" Version="17.5.1" />
<PackageReference Include="Luxoft.Framework.DomainDriven.ServiceModel.IAD.DTO" />
</ItemGroup>

</Project>
Loading

0 comments on commit 82ece90

Please sign in to comment.