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

Updates for CSLA 9 release #4371

Merged
merged 18 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f30a1fa
#3785 Update to .NET 9 package references
rockfordlhotka Nov 21, 2024
c1eb221
#3785 Update to .NET 9 package references
rockfordlhotka Nov 21, 2024
b789c71
Merge branch '3785-samples' of https://github.com/marimerllc/csla int…
rockfordlhotka Nov 22, 2024
3dd2ff8
#3785 Update to .NET 9 package references
rockfordlhotka Nov 21, 2024
395e7f1
Merge branch '3785-samples' of https://github.com/MarimerLLC/csla int…
rockfordlhotka Nov 25, 2024
6249dd6
Merge branch 'main' of https://github.com/marimerllc/csla into 3785-s…
rockfordlhotka Nov 28, 2024
b6be8b1
#3785 Update to .NET 9 package references
rockfordlhotka Nov 21, 2024
f282887
Merge branch '3785-samples' of https://github.com/MarimerLLC/csla int…
rockfordlhotka Dec 5, 2024
11d5004
Merge branch 'main' of https://github.com/MarimerLLC/csla into 3785-s…
rockfordlhotka Dec 6, 2024
2183a3a
#4354 Use correct context manager for aspnet classic
rockfordlhotka Dec 6, 2024
f1e4aa4
Add global.json to solution files
rockfordlhotka Dec 6, 2024
eb8f020
#4360 Create packages for generators
rockfordlhotka Dec 6, 2024
b581ae8
Update v9 upgrade guide with RabbitMQ changes and NRT
StefanOssendorf Dec 9, 2024
0196741
Add missing net8 TFM in Grpc and RabbitMQ projects
StefanOssendorf Dec 9, 2024
7655424
Add missing NRT clarification
StefanOssendorf Dec 9, 2024
3f459c6
Merge branch 'main' of https://github.com/MarimerLLC/csla into 3785-s…
rockfordlhotka Dec 13, 2024
1f81036
Revert MAUI controls update because they cause the build to fail
rockfordlhotka Dec 13, 2024
bdab759
#3785 Update for CSLA 9
rockfordlhotka Dec 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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@page "/editpersonform"
@page "/editpersonform/{id}"

@* @rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false)) *@
@rendermode InteractiveAuto

@inject Csla.Blazor.State.StateManager StateManager
@inject Csla.IDataPortal<PersonEdit> personEditPortal
@inject Csla.Blazor.ViewModel<PersonEdit> vm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

builder.Services.AddCsla(o => o
.AddBlazorWebAssembly(o => o.SyncContextWithServer = true)
.Security(o => o.FlowSecurityPrincipalFromClient = true)
.Security(o => o.FlowSecurityPrincipalFromClient = false)
.DataPortal(o => o.AddClientSideDataPortal(o => o
.UseHttpProxy(o => o.DataPortalUrl = "/api/DataPortal"))));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
@using BlazorExample.Client
@using BlazorExample.Client.Components.Shared
@using BusinessLibrary
@using Csla
@using Csla
@using Csla.Blazor
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>DataAccess.Mock</AssemblyName>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
18 changes: 8 additions & 10 deletions Samples/BlazorExample/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
<CslaVersion>9.0.0-alpha-g27c299cae5</CslaVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Csla" Version="$(CslaVersion)" />
<PackageVersion Include="Csla.AspNetCore" Version="$(CslaVersion)" />
<PackageVersion Include="Csla.Blazor" Version="$(CslaVersion)" />
<PackageVersion Include="Csla.Blazor.WebAssembly" Version="$(CslaVersion)" />

<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.1" />

<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.1" />
<PackageVersion Include="Csla" Version="9.0.0-rc1-g1f81036133" />
<PackageVersion Include="Csla.AspNetCore" Version="9.0.0-rc1-g1f81036133" />
<PackageVersion Include="Csla.Blazor" Version="9.0.0-rc1-g1f81036133" />
<PackageVersion Include="Csla.Blazor.WebAssembly" Version="9.0.0-rc1-g1f81036133" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/Csla.Channels.Grpc/Csla.Channels.Grpc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net8.0;net9.0</TargetFrameworks>
<Product>CSLA .NET gRPC Channel</Product>
<Description>gRPC data portal channel for CSLA .NET.</Description>
<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net8.0;net9.0</TargetFrameworks>
<Product>CSLA .NET RabbitMQ Channel</Product>
<Description>RabbitMQ data portal channel for CSLA .NET.</Description>
<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Csla.Generator.AutoImplementProperties.CSharp.AutoImplement
{
/// <summary>
/// Generates partial classes for incremental properties implementation based based on the presence of the <see cref="Csla.Serialization.CslaImplementPropertiesInterfaceAttribute{T}"/> attribute.
/// Generates partial classes for incremental properties implementation based based on the presence of the <see cref="Csla.CslaImplementPropertiesInterfaceAttribute{T}"/> attribute.
/// </summary>
[Generator]
public class IncrementalAutoImplementInterfacePartialsGenerator : IIncrementalGenerator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Csla.Generator.AutoImplementProperties.CSharp.AutoImplement
{
/// <summary>
/// Generates partial classes for incremental properties implementation based on the presence of the <see cref="Csla.Serialization.CslaImplementPropertiesAttribute"/> attribute.
/// Generates partial classes for incremental properties implementation based on the presence of the <see cref="Csla.CslaImplementPropertiesAttribute"/> attribute.
/// </summary>
[Generator]
public class IncrementalAutoImplementPropertiesPartialsGenerator : IIncrementalGenerator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<BaseOutputPath>..\..\..\..\..\Bin</BaseOutputPath>
<OutputPath>..\..\..\..\..\bin\packages\</OutputPath>

<AssemblyName>Csla.Generator.AutoImplementProperties.CSharp</AssemblyName>
<RootNamespace>Csla.Generator.AutoImplementProperties.CSharp</RootNamespace>
Expand All @@ -32,7 +33,8 @@
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" PrivateAssets="all" />
</ItemGroup>
<PackageReference Include="Backport.System.Threading.Lock" Version="3.0.3" />
</ItemGroup>

<ItemGroup>
<None Update="tools\*.ps1" CopyToOutputDirectory="Always" Pack="true" PackagePath="" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public string GetTypeNamespace(TypeSyntax typeSyntax)
/// <summary>
/// Determine if a type declaration represents a type that is auto serializable
/// </summary>
/// <param name="typeSymbol">The declaration representing the type to be tested</param>
/// <param name="typeDeclarationSyntax">The declaration representing the type to be tested</param>
/// <returns>Boolean true if the type is decorated with the AutoSerializable attribute, otherwise false</returns>
public bool IsTypeAutoSerializable(TypeDeclarationSyntax typeDeclarationSyntax)
{
Expand All @@ -76,7 +76,7 @@ public bool IsTypeAutoSerializable(TypeDeclarationSyntax typeDeclarationSyntax)
/// <summary>
/// Determine if a type declaration represents a type that is auto serializable
/// </summary>
/// <param name="typeSymbol">The declaration representing the type to be tested</param>
/// <param name="typeSyntax">The declaration representing the type to be tested</param>
/// <returns>Boolean true if the type is decorated with the AutoSerializable attribute, otherwise false</returns>
public bool IsTypeAutoSerializable(TypeSyntax typeSyntax)
{
Expand All @@ -90,7 +90,7 @@ public bool IsTypeAutoSerializable(TypeSyntax typeSyntax)
/// <summary>
/// Determine if a type declaration represents a type that implements the IMobileObject interface
/// </summary>
/// <param name="typeSymbol">The declaration representing the type to be tested</param>
/// <param name="typeSyntax">The declaration representing the type to be tested</param>
/// <remarks>Determines if the type either implements the interface directly or via inheritance</remarks>
/// <returns>Boolean true if the type implements the IMobileObject interface, otherwise false</returns>
public bool DoesTypeImplementIMobileObject(TypeSyntax typeSyntax)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static bool GetFieldTypeNullable(DefinitionExtractionContext extractionC
/// Extract the name of the field for which we are building information
/// </summary>
/// <param name="extractionContext">The definition extraction context in which the extraction is being performed</param>
/// <param name="targetTypeDeclaration">The FieldDeclarationSyntax from which to extract the necessary information</param>
/// <param name="fieldDeclaration">The FieldDeclarationSyntax from which to extract the necessary information</param>
/// <returns>The name of the field for which we are extracting information</returns>
private static string GetFieldName(DefinitionExtractionContext extractionContext, FieldDeclarationSyntax fieldDeclaration)
{
Expand All @@ -66,7 +66,7 @@ private static string GetFieldName(DefinitionExtractionContext extractionContext
/// Extract the type name of the field for which we are building information
/// </summary>
/// <param name="extractionContext">The definition extraction context in which the extraction is being performed</param>
/// <param name="targetTypeDeclaration">The FieldDeclarationSyntax from which to extract the necessary information</param>
/// <param name="fieldDeclaration">The FieldDeclarationSyntax from which to extract the necessary information</param>
/// <returns>The type name of the field for which we are extracting information</returns>
private static string GetFieldTypeName(DefinitionExtractionContext extractionContext, FieldDeclarationSyntax fieldDeclaration)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static class PropertyDefinitionExtractor
/// Extract information about a single property from its declaration in the syntax tree
/// </summary>
/// <param name="extractionContext">The definition extraction context in which the extraction is being performed</param>
/// <param name="targetTypeDeclaration">The PropertyDeclarationSyntax from which to extract the necessary data</param>
/// <param name="propertyDeclaration">The PropertyDeclarationSyntax from which to extract the necessary data</param>
/// <returns>A readonly list of ExtractedPropertyDefinition containing the data extracted from the syntax tree</returns>
public static ExtractedPropertyDefinition ExtractPropertyDefinition(DefinitionExtractionContext extractionContext, PropertyDeclarationSyntax propertyDeclaration)
{
Expand Down Expand Up @@ -54,7 +54,7 @@ private static bool GetFieldTypeNullable(DefinitionExtractionContext extractionC
/// Extract the name of the property for which we are building information
/// </summary>
/// <param name="extractionContext">The definition extraction context in which the extraction is being performed</param>
/// <param name="targetTypeDeclaration">The PropertyDeclarationSyntax from which to extract the necessary information</param>
/// <param name="propertyDeclaration">The PropertyDeclarationSyntax from which to extract the necessary information</param>
/// <returns>The name of the property for which we are extracting information</returns>
private static string GetPropertyName(DefinitionExtractionContext extractionContext, PropertyDeclarationSyntax propertyDeclaration)
{
Expand All @@ -65,7 +65,7 @@ private static string GetPropertyName(DefinitionExtractionContext extractionCont
/// Extract the type name of the property for which we are building information
/// </summary>
/// <param name="extractionContext">The definition extraction context in which the extraction is being performed</param>
/// <param name="targetTypeDeclaration">The PropertyDeclarationSyntax from which to extract the necessary information</param>
/// <param name="propertyDeclaration">The PropertyDeclarationSyntax from which to extract the necessary information</param>
/// <returns>The type name of the property for which we are extracting information</returns>
private static string GetPropertyTypeName(DefinitionExtractionContext extractionContext, PropertyDeclarationSyntax propertyDeclaration)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@

namespace Csla.Generator.AutoSerialization.CSharp.AutoSerialization
{
/// <summary>
///
/// </summary>
[Generator]
public class IncrementalSerializationPartialsGenerator : IIncrementalGenerator
{
/// <summary>
///
/// </summary>
/// <param name="context"></param>
public void Initialize(IncrementalGeneratorInitializationContext context)
{
// Register a syntax receiver to collect information during the initial parsing phase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<BaseOutputPath>..\..\..\..\..\Bin</BaseOutputPath>
<OutputPath>..\..\..\..\..\bin\packages\</OutputPath>

<AssemblyName>Csla.Generator.AutoSerialization.CSharp</AssemblyName>
<RootNamespace>Csla.Generator.AutoSerialization.CSharp</RootNamespace>
Expand All @@ -31,7 +32,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" PrivateAssets="all" />
</ItemGroup>
<PackageReference Include="Backport.System.Threading.Lock" Version="3.0.3" />
</ItemGroup>

<ItemGroup>
<None Update="tools\*.ps1" CopyToOutputDirectory="Always" Pack="true" PackagePath="" />
Expand Down
9 changes: 4 additions & 5 deletions Source/Csla.Xaml.Maui/Csla.Xaml.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith(&quot;net9&quot;))">
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.21" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.21" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.12" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.12" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith(&quot;net8&quot;))">
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.21" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.21" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.12" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.12" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
</ItemGroup>

<PropertyGroup>
<DefineConstants>$(DefineConstants);MAUI</DefineConstants>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>CSLA .NET for MAUI</Title>
<PackageTags>CSLA;Business;MAUI</PackageTags>
<PackageId>Csla.Maui</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla/Core/ApplicationContextAccessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ApplicationContextAccessor(
public IContextManager GetContextManager()
{
var runtimeInfo = ServiceProvider.GetRequiredService<IRuntimeInfo>();
if (ContextManager != null && !runtimeInfo.LocalProxyNewScopeExists)
if (ContextManager != null && !runtimeInfo.LocalProxyNewScopeExists && ContextManager.IsValid)
return ContextManager;
else
return LocalContextManager;
Expand Down
5 changes: 4 additions & 1 deletion Source/Directory.Package.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<NeutralLanguage>en-US</NeutralLanguage>
<DefaultLanguage>en-US</DefaultLanguage>


<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>

<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand Down
Loading
Loading