Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iatsuta/19.2.1 small fix #265

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build+unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ jobs:
dotnet test src/_Configuration/Framework.Configuration.SubscriptionModeling.Tests.Unit --no-build --verbosity normal
dotnet test src/_DomainDriven/Framework.DomainDriven.ServiceModel.Tests.Unit --no-build --verbosity normal
dotnet test src/_DomainDriven/Framework.DomainDriven.DBGenerator.Tests.Unit --no-build --verbosity normal
dotnet test src/_DomainDriven/Framework.DomainDriven.BLL.Security.Tests.Unit --no-build --verbosity normal

Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public void Flush()

public IServiceProvider ServiceProvider { get; }

public ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>() => this.ServiceProvider.GetRequiredService<ISecurityProvider<TDomainObject>>();
public ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>()
where TDomainObject : PersistentDomainObjectBase
=> this.ServiceProvider.GetRequiredService<ISecurityProvider<TDomainObject>>();

public ISecurityOperationResolver SecurityOperationResolver => this.ServiceProvider.GetRequiredService<ISecurityOperationResolver>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public interface ISecurityBLLContext<in TPersistentDomainObjectBase, TIdent> :

where TPersistentDomainObjectBase : class, IIdentityObject<TIdent>
{
ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>();
ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>()
where TDomainObject : TPersistentDomainObjectBase;

ISecurityOperationResolver SecurityOperationResolver { get; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected SecurityBLLBaseContext(
public virtual IAccessDeniedExceptionService AccessDeniedExceptionService { get; }

public ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>()
where TDomainObject : TPersistentDomainObjectBase
{
return this.ServiceProvider.GetRequiredService<ISecurityProvider<TDomainObject>>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public interface IAsyncDal<TDomainObject, in TIdent>

Task RemoveAsync(TDomainObject domainObject, CancellationToken cancellationToken = default);

Task LockAsync(TDomainObject domain, LockRole lockRole, CancellationToken cancellationToken = default);
Task LockAsync(TDomainObject domainObject, LockRole lockRole, CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Framework.Core;
using Framework.DomainDriven.DAL.Revisions;
using Framework.Persistent;
using NHibernate;

namespace Framework.DomainDriven.UnitTest.Mock;

Expand Down Expand Up @@ -127,24 +128,42 @@ public TDomain GetById(TIdent id, LockRole lockRole)
return this._collection.FirstOrDefault(z => EqualityComparer<TIdent>.Default.Equals(z.Id, id));
}

public IQueryable<TDomain> GetQueryable() => throw new NotImplementedException();
public IQueryable<TDomain> GetQueryable() => this.GetQueryable(LockRole.None);

public TDomain Load(TIdent id)
{
return this.GetById(id, LockRole.None);
}

public async Task<TDomain> LoadAsync(TIdent id, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public async Task<TDomain> LoadAsync(TIdent id, CancellationToken cancellationToken = default)
{
return this.Load(id);
}

public async Task RefreshAsync(TDomain domainObject, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public async Task RefreshAsync(TDomain domainObject, CancellationToken cancellationToken = default)
{
this.Refresh(domainObject);
}

public async Task SaveAsync(TDomain domainObject, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public async Task SaveAsync(TDomain domainObject, CancellationToken cancellationToken = default)
{
this.Save(domainObject);
}

public async Task InsertAsync(TDomain domainObject, TIdent id, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public async Task InsertAsync(TDomain domainObject, TIdent id, CancellationToken cancellationToken = default)
{
this.Insert(domainObject, id);
}

public async Task RemoveAsync(TDomain domainObject, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public async Task RemoveAsync(TDomain domainObject, CancellationToken cancellationToken = default)
{
this.Remove(domainObject);
}

public async Task LockAsync(TDomain domain, LockRole lockRole, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public async Task LockAsync(TDomain domainObject, LockRole lockRole, CancellationToken cancellationToken = default)
{
this.Lock(domainObject, lockRole);
}

public virtual void Save(TDomain domainObject)
{
Expand Down
6 changes: 3 additions & 3 deletions src/__SolutionItems/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[assembly: AssemblyCompany("Luxoft")]
[assembly: AssemblyCopyright("Copyright © Luxoft 2009-2023")]

[assembly: AssemblyVersion("19.2.0.0")]
[assembly: AssemblyFileVersion("19.2.0.0")]
[assembly: AssemblyInformationalVersion("19.2.0.0")]
[assembly: AssemblyVersion("19.2.1.0")]
[assembly: AssemblyFileVersion("19.2.1.0")]
[assembly: AssemblyInformationalVersion("19.2.1.0")]

#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
Expand Down