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

add net8.0 and efcore 8.0 #475

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
a001f42
Add generic method to Asp.Core
ehsangfl May 6, 2023
b49e06b
Add generic method to Asp.Core
ehsangfl May 6, 2023
9e6a135
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl May 6, 2023
941f2f1
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl May 28, 2023
ee86d6c
Add generic method to Asp.Core
ehsangfl May 6, 2023
75f52d4
Add generic extension methods to AspCore services and pipline (#413)
ehsangfl May 9, 2023
75076fc
Update README.md with .NET Foundation content (#415)
ChrisSfanos May 15, 2023
b75e7de
Fix to prevent #247 from happening again (#412)
Daniel-Svensson May 16, 2023
1987df6
Update nugets for .csproj and .nuspec files
SandstromErik May 16, 2023
d9d11b2
Remove NET40 define from tools project (#417)
Daniel-Svensson May 22, 2023
6d134ee
Update assembly info and prepare building codegen nuget directly from…
Daniel-Svensson May 22, 2023
73cef2c
Fix filepath in CodeGen.nuspec
SandstromErik May 22, 2023
a87d22a
Fix version prefix for AspNetCore and EntityFrameworkCore
SandstromErik May 22, 2023
0e2d13a
update C# languange version to 11 (#419)
Daniel-Svensson May 24, 2023
29175c2
Improvements to AspNetCore endpoint metadata and net7 support (#418)
Daniel-Svensson May 24, 2023
5f4960b
Fixed CodeGen target name in nuspec file (#420)
SandstromErik May 24, 2023
f8fd158
Modify the next size to rent for buffer in ArrayPoolStream (#421)
SandstromErik May 25, 2023
2788466
Update Changelog.md (#422)
SandstromErik May 25, 2023
b6064ab
Fix error in Assembly and Task name. (#423)
lindellhugo May 26, 2023
d96a33c
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl May 28, 2023
6bdaacb
Add generic method to Asp.Core
ehsangfl May 6, 2023
3c2b93a
Add generic extension methods to AspCore services and pipline (#413)
ehsangfl May 9, 2023
57b996a
Update README.md with .NET Foundation content (#415)
ChrisSfanos May 15, 2023
c6b5597
Fix to prevent #247 from happening again (#412)
Daniel-Svensson May 16, 2023
233eff9
Update nugets for .csproj and .nuspec files
SandstromErik May 16, 2023
d47bb07
Remove NET40 define from tools project (#417)
Daniel-Svensson May 22, 2023
cb466fc
Update assembly info and prepare building codegen nuget directly from…
Daniel-Svensson May 22, 2023
c5f89fd
Fix filepath in CodeGen.nuspec
SandstromErik May 22, 2023
917941f
Fix version prefix for AspNetCore and EntityFrameworkCore
SandstromErik May 22, 2023
5430ca1
update C# languange version to 11 (#419)
Daniel-Svensson May 24, 2023
8793dfb
Improvements to AspNetCore endpoint metadata and net7 support (#418)
Daniel-Svensson May 24, 2023
af4dddf
Fixed CodeGen target name in nuspec file (#420)
SandstromErik May 24, 2023
fb17d5a
Modify the next size to rent for buffer in ArrayPoolStream (#421)
SandstromErik May 25, 2023
1b0a5fe
Update Changelog.md (#422)
SandstromErik May 25, 2023
b4760b1
Fix error in Assembly and Task name. (#423)
lindellhugo May 26, 2023
5b1058a
Merge branch 'OpenRIAServices:main' into main
ehsangfl Nov 27, 2023
d0e9791
Update nugets for .csproj and .nuspec files
SandstromErik May 16, 2023
1293448
Fix filepath in CodeGen.nuspec
SandstromErik May 22, 2023
a0d91c9
merge with remote
ehsangfl Nov 27, 2023
b9d3561
Merge branch 'OpenRIAServices:main' into main
ehsangfl Jan 6, 2024
13c8e2e
add net8.0 and efcore8
ehsangfl Jan 7, 2024
3f4539d
Improve debugging symbols
ehsangfl Jan 7, 2024
9374d70
Improve compiler symbols
ehsangfl Jan 7, 2024
de2c1f0
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl Jan 7, 2024
08858c1
Update Changelog.md (#476)
SandstromErik Jan 10, 2024
df236ed
Add net8 build of OpenRiaServices.Hosting.AspNetCore so that users do…
Daniel-Svensson Jan 19, 2024
a94c683
stop generating odata nuget (#478)
Daniel-Svensson Jan 19, 2024
2c9f4c2
Use portable pdb for .NET Framework (#484)
Daniel-Svensson Jan 22, 2024
0f00bbd
Update Mstest to 3.2.0 (#486)
Daniel-Svensson Jan 29, 2024
069a03f
Improve Add/Attach performance for large graphs (#487)
Daniel-Svensson Feb 7, 2024
46b789d
Various performance improvements (#488)
Daniel-Svensson Feb 8, 2024
d9710a1
Spanify DynamicQueryable (#485)
Daniel-Svensson Feb 8, 2024
e89b39f
Skip OfType in EntityRef.GetSingleMatch if possible (#491)
Daniel-Svensson Feb 14, 2024
a2cb57e
Update OpenRiaServices.Hosting.AspNetCore to 1.1.0
Daniel-Svensson Mar 14, 2024
cdf36ac
Make sure code generation using text template does not use compiler a…
SandstromErik Apr 12, 2024
62b7de9
merge with origin
ehsangfl Apr 13, 2024
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
36 changes: 30 additions & 6 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
# Unreleased
# Unreleased (5.5.0)

### Server
* Reduced allocatgions when parsing queries on server (both WCF and AspNetCore hosting) in https://github.com/OpenRIAServices/OpenRiaServices/pull/485
* Update nuget dependencies and add new dependencies to OpenRiaServices.Hosting.Wcf
* `System.Collections.Immutable` and `System.Memory` are new dependencies of Wcf hosting

* .NET Framework builds now includes the smaller portable pdb's instead of of the old "full" windows style pdb's
* NOTE: For .NET Framework apps ensure that *supportedRuntime* in *app.config* and corresponding setting in *web.config* does not specify an older runtime if you wan't line numbers in stack traces.

# 5.4.2 / AspNetCore 1.0.0

### .NET8
* Build with .NET8 sdk and run AspNetCore tests with .NET8 by @Daniel-Svensson in https://github.com/OpenRIAServices/OpenRiaServices/pull/463
* Run most client, server and code generation tests with .NET8 by @SandstromErik in https://github.com/OpenRIAServices/OpenRiaServices/pull/458

### Code generation
* Do not use attributes reserved for the compiler in code generation. Will make it possible to use nullable reference types and the `required` modifier for fields and properties by @SandstromErik in https://github.com/OpenRIAServices/OpenRiaServices/pull/472

### AspNetCore updates
* Add authentication documentation #466
* Use FrozenSet in first location (QueryStringConverter)
* Update versionprefix to 1.0.0 (for next release)
* Various updates by @Daniel-Svensson in https://github.com/OpenRIAServices/OpenRiaServices/pull/466
* Add authentication documentation
* Use FrozenSet in first location (QueryStringConverter)
* Update versionprefix to 1.0.0 (for next release)

### Testhost
* Add support in `DomainServiceTestHost` for asynchronous queries that return a single entity by @erikoijwall in https://github.com/OpenRIAServices/OpenRiaServices/pull/464

### Other
* Update nuget dependencies for tests
* Fix test which would sometimes hang
* Build improvments, including set `MSBUILDDEBUGPATH` allowing troubleshooting of build failures by @Daniel-Svensson in https://github.com/OpenRIAServices/OpenRiaServices/pull/463
* Update nuget dependencies for tests by @Daniel-Svensson in https://github.com/OpenRIAServices/OpenRiaServices/pull/468
* Fix test which would sometimes hang by @Daniel-Svensson in https://github.com/OpenRIAServices/OpenRiaServices/pull/469
* Add tests to see that codegen works with nullable reference types by @Daniel-Svensson in https://github.com/OpenRIAServices/OpenRiaServices/pull/470
* Use `BinaryHttpDomainClient` in AspNetCore Test by @SandstromErik in https://github.com/OpenRIAServices/OpenRiaServices/pull/471

# 5.4.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
</description>
<summary>Open RIA Services - Server-side assemblies and configuration</summary>
<releaseNotes>For release notes see https://github.com/OpenRIAServices/OpenRiaServices/releases</releaseNotes>
<copyright>2019 Outercurve Foundation</copyright>
<copyright>2024 .NET Foundation</copyright>
<language>en-US</language>
<tags>WCF RIA Services RIAServices Server aspnet OpenRiaServices</tags>
<dependencies>
<group targetFramework="net472">
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0"/>
<dependency id="OpenRiaServices.Server" version="$version$"/>
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="7.0.0"/>
<dependency id="System.Collections.Immutable" version="8.0.0" />
<dependency id="System.Memory" version="4.5.5"/>
</group>
</dependencies>
</metadata>
Expand All @@ -33,4 +35,4 @@
<file src="..\..\src\bin\Release\net472\OpenRiaServices.Hosting.Wcf.pdb" target="lib\net472\OpenRiaServices.Hosting.Wcf.pdb" />
<file src="..\..\src\bin\Release\net472\OpenRiaServices.Hosting.Wcf.xml" target="lib\net472\OpenRiaServices.Hosting.Wcf.xml" />
</files>
</package>
</package>
35 changes: 0 additions & 35 deletions NuGet/OpenRiaServices.OData/OpenRiaServices.OData.nuspec

This file was deleted.

10 changes: 0 additions & 10 deletions NuGet/OpenRiaServices.OData/content/web.config.transform

This file was deleted.

2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ steps:
versionEnvVar: Build.BuildNumber
packDestination: '$(Build.ArtifactStagingDirectory)'
continueOnError: true
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))

- task: CopyFiles@2
displayName: 'Copy VS Extension: $(build.artifactstagingdirectory)'
Expand Down
6 changes: 0 additions & 6 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@
<AssemblyOriginatorKeyFile Condition="'$(AssemblyOriginatorKeyFile)' == '' And '$(IsTestProject)' == 'true'">$(MSBuildThisFileDirectory)\snk\Tests.snk</AssemblyOriginatorKeyFile>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>

<!-- opt out from portable pdbs, for better compability with older net framework releases
This is required for several test related projects since code generation's
pdb reader cannot read the portable ones
-->
<DebugType>portable</DebugType>
<DebugType Condition="$(TargetFramework.StartsWith('net4')) OR '$(IsTestProject)'=='true'">pdbonly</DebugType>

</PropertyGroup>

<PropertyGroup Condition="'$(GitVersion_AssemblySemVer)' != ''">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ public virtual string ConvertValueToString(object parameter, Type parameterType)
[SuppressMessage("Reliability", "Reliability104:CaughtAndHandledExceptionsRule", Justification = "The exception is traced in the finally clause")]
TypeConverter GetStringConverter(Type parameterType)
{
if (this._typeConverterCache.ContainsKey(parameterType))
if (this._typeConverterCache.TryGetValue(parameterType, out TypeConverter typeConverter))
{
return (TypeConverter)this._typeConverterCache[parameterType];
return typeConverter;
}
TypeConverterAttribute[] typeConverterAttrs = parameterType.GetCustomAttributes(typeof(TypeConverterAttribute), true) as TypeConverterAttribute[];
if (typeConverterAttrs != null)
Expand Down
6 changes: 2 additions & 4 deletions src/OpenRiaServices.Client/Framework/ChangeSetBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ internal static void CheckForInvalidUpdates(EntityChangeSet changeSet)
/// </summary>
internal class UnmodifiedOperationAdder : EntityVisitor
{
private readonly Dictionary<object, bool> _visited = new Dictionary<object, bool>();
private readonly HashSet<object> _visited = new HashSet<object>();
private readonly List<ChangeSetEntry> _changeSetEntries;
private int _id;
private bool _isChild;
Expand Down Expand Up @@ -180,7 +180,7 @@ public static void Add(List<ChangeSetEntry> changeSetEntries)

public override void Visit(Entity entity)
{
if (this._visited.ContainsKey(entity))
if (!this._visited.Add(entity))
{
return;
}
Expand All @@ -192,8 +192,6 @@ public override void Visit(Entity entity)
this._changeSetEntries.Add(op);
}

this._visited.Add(entity, true);

base.Visit(entity);
}

Expand Down
64 changes: 19 additions & 45 deletions src/OpenRiaServices.Client/Framework/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ private set
EntitySet entitySet = this.LastSet;
if (entitySet != null)
{
bool isInteresting = this._entityState != EntityState.Unmodified
&& this._entityState != EntityState.Detached;
bool isInteresting = this._entityState is not EntityState.Unmodified
and not EntityState.Detached;
entitySet.TrackAsInteresting(this, isInteresting);
}

Expand Down Expand Up @@ -302,12 +302,9 @@ internal void OnChildUpdate()
}
}

if (this.EntitySet != null)
{
// when a child has been changed in any way, the parent becomes
// interesting
this.EntitySet.TrackAsInteresting(this, true);
}
// when a child has been changed in any way, the parent becomes
// interesting
this.EntitySet?.TrackAsInteresting(this, true);
}

/// <summary>
Expand Down Expand Up @@ -526,8 +523,7 @@ private set
this._isMerging = value;
foreach (MetaMember metaMember in MetaType.DataMembers.Where(f => f.IsComplex && !f.IsCollection))
{
ComplexObject propertyValue = metaMember.GetValue(this) as ComplexObject;
if (propertyValue != null)
if (metaMember.GetValue(this) is ComplexObject propertyValue)
{
propertyValue.IsMergingState = this._isMerging;
}
Expand Down Expand Up @@ -647,10 +643,7 @@ internal void Reset()
this._editSession = null;
this._trackChanges = false;
UndoAllEntityActions(throwIfSubmitting: true);
if (this._validationErrors != null)
{
this._validationErrors.Clear();
}
this._validationErrors?.Clear();
this.EntityConflict = null;
this.EntitySet = null;
this._lastSet = null;
Expand Down Expand Up @@ -682,8 +675,8 @@ internal void StopTracking()
/// </summary>
protected void AcceptChanges()
{
if (this.EntityState == EntityState.Unmodified ||
this.EntityState == EntityState.Detached)
if (this.EntityState is EntityState.Unmodified or
EntityState.Detached)
{
// if we're detached or have no changes, noop after
// closing any in progress edit session
Expand All @@ -696,11 +689,7 @@ protected void AcceptChanges()
// Accept any child changes. Note, we must accept child changes before setting our own
// state to Unmodified. This avoids a situation where we get notifications from child
// entities that cause our state to flip back to Modified.
if (entitySet != null)
{
// accept any child changes
entitySet.EntityContainer.CompleteChildChanges(this, true);
}
entitySet?.EntityContainer.CompleteChildChanges(this, true);

if (this.EntityState == EntityState.New)
{
Expand Down Expand Up @@ -730,30 +719,21 @@ protected void AcceptChanges()
else if (this.EntityState == EntityState.Deleted)
{
this.StopTracking();
if (entitySet != null)
{
entitySet.RemoveFromCache(this);
}
entitySet?.RemoveFromCache(this);
// move back to the default state
this.EntityState = EntityState.Detached;
}

if (entitySet != null)
{
// remove from the interesting entities set
entitySet.TrackAsInteresting(this, false);
}
// remove from the interesting entities set
entitySet?.TrackAsInteresting(this, false);

// need to end any in progress edit session
this._editSession = null;

// clear all custom method invocations
this.UndoAllEntityActions(throwIfSubmitting: false);

if (this._validationErrors != null)
{
this._validationErrors.Clear();
}
this._validationErrors?.Clear();
this.EntityConflict = null;
this.IsInferred = false;
this._hasChildChanges = false;
Expand All @@ -769,8 +749,8 @@ protected void AcceptChanges()
/// </summary>
protected void RejectChanges()
{
if (this.EntityState == EntityState.Unmodified ||
this.EntityState == EntityState.Detached)
if (this.EntityState is EntityState.Unmodified or
EntityState.Detached)
{
// if we're detached or have no changes, noop after
// closing any in progress edit session
Expand All @@ -783,10 +763,7 @@ protected void RejectChanges()
// Reject any child changes. Note, we must reject child changes before setting our own
// state to Unmodified. This avoids a situation where we get notifications from child
// entities that cause our state to flip back to Modified.
if (entitySet != null)
{
entitySet.EntityContainer.CompleteChildChanges(this, false);
}
entitySet?.EntityContainer.CompleteChildChanges(this, false);

if (this._entityState == EntityState.Modified || this.Parent != null)
{
Expand Down Expand Up @@ -830,10 +807,7 @@ protected void RejectChanges()
UndoAllEntityActions();

// Empty out the error collections
if (this._validationErrors != null)
{
this._validationErrors.Clear();
}
this._validationErrors?.Clear();
this.EntityConflict = null;
this._hasChildChanges = false;
Debug.Assert(!this.HasChanges, "Entity.HasChanges should be false");
Expand Down Expand Up @@ -1845,7 +1819,7 @@ private EditSession(Entity entity)
{
this._entity = entity;
this._lastState = entity.EntityState;
this._customMethodInvocations = entity._customMethodInvocations != null ? entity._customMethodInvocations.ToArray() : null;
this._customMethodInvocations = entity._customMethodInvocations?.ToArray();
this._validationErrors = entity.ValidationErrors.ToArray();
this._modifiedProperties = new List<string>();
}
Expand Down
Loading
Loading