Skip to content

Commit

Permalink
Add net 6.0 as target framework for OpenRiaServices.Server.UnitTesting (
Browse files Browse the repository at this point in the history
#364)

* Add net 6.0 as target framework for OpenRiaServices.Server.UnitTesting (#364)

* Update nuget spec

* Introduce User as public property
  • Loading branch information
lindellhugo authored Jul 27, 2022
1 parent 2bf911f commit 737625a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions NuGet/OpenRiaServices.UnitTesting.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>OpenRiaServices.UnitTesting</id>
<version>4.5.1</version>
<version>4.5.2</version>
<title>Open RIA Services Unit Testing</title>
<authors>Outercurve RIA Services</authors>
<owners>Outercurve</owners>
Expand All @@ -23,5 +23,9 @@
<file src="..\src\bin\Release\net472\OpenRiaServices.Server.UnitTesting.dll" target="lib\net472\OpenRiaServices.Server.UnitTesting.dll" />
<file src="..\src\bin\Release\net472\OpenRiaServices.Server.UnitTesting.pdb" target="lib\net472\OpenRiaServices.Server.UnitTesting.pdb" />
<file src="..\src\bin\Release\net472\OpenRiaServices.Server.UnitTesting.xml" target="lib\net472\OpenRiaServices.Server.UnitTesting.xml" />

<file src="..\src\bin\Release\net6.0\OpenRiaServices.Server.UnitTesting.dll" target="lib\net6.0\OpenRiaServices.Server.UnitTesting.dll" />
<file src="..\src\bin\Release\net6.0\OpenRiaServices.Server.UnitTesting.pdb" target="lib\net6.0\OpenRiaServices.Server.UnitTesting.pdb" />
<file src="..\src\bin\Release\net6.0\OpenRiaServices.Server.UnitTesting.xml" target="lib\net6.0\OpenRiaServices.Server.UnitTesting.xml" />
</files>
</package>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -992,13 +992,14 @@ private OperationContext CreateOperationContext(DomainOperationType operationTyp
{
// TODO: consider whether this implementation should call dispose
// Maybe OperationContext would implement IDisposable...

IPrincipal user = (IPrincipal)ServiceProvider.GetService(typeof(IPrincipal));
DomainServiceContext domainServiceContext =
new DomainServiceContext(this.ServiceProvider, operationType);
new DomainServiceContext(this.ServiceProvider, user, operationType);
DomainService domainService =
this.Factory.CreateDomainService(typeof(TDomainService), domainServiceContext);
DomainServiceDescription domainServiceDescription =
DomainServiceDescription.GetDescription(typeof(TDomainService));

return new OperationContext(domainServiceContext, domainService, domainServiceDescription);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.ComponentModel.DataAnnotations" />
Expand Down

0 comments on commit 737625a

Please sign in to comment.