Skip to content

Commit

Permalink
Merge pull request #3625 from rockfordlhotka/v8-rules
Browse files Browse the repository at this point in the history
Enhancements and bug fixes
  • Loading branch information
rockfordlhotka authored Dec 21, 2023
2 parents af03b0d + 10cf1b1 commit 3ea6545
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 60 deletions.
6 changes: 0 additions & 6 deletions NuGet/Definition/Csla.AspNetCore.NuSpec
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<description>UI helpers for using CSLA .NET business types with AspNetCore.</description>
<language>en-US</language>
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="Csla" version="[4.6.3-Beta10]" />
<dependency id="Microsoft.AspNetCore.Mvc" version="2.2.0" />
</group>
<group targetFramework="net6.0">
<dependency id="Csla" version="[4.6.3-Beta10]" />
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0" />
Expand All @@ -38,8 +34,6 @@
</dependencies>
</metadata>
<files>
<!-- NetStandard Assembly -->
<file src="..\..\bin\Release\netstandard2.0\**\Csla.AspNetCore.*" target="lib\netstandard2.0" />
<!-- Net6.0 Assembly -->
<file src="..\..\bin\Release\net6.0\**\Csla.AspNetCore.*" target="lib\net6.0" />
<!-- Net8.0 Assembly -->
Expand Down
16 changes: 3 additions & 13 deletions NuGet/Definition/Csla.Blazor.NuSpec
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
<description>UI helpers for using CSLA .NET business types with Blazor.</description>
<language>en-US</language>
<dependencies>
<group targetFramework="netstandard2.1">
<dependency id="Csla" version="[4.6.3-Beta10]" />
<dependency id="Microsoft.AspNetCore.Components" version="3.1.9" />
<dependency id="Microsoft.AspNetCore.Components.Web" version="3.1.9" />
<dependency id="Microsoft.AspNetCore.Components.Authorization" version="3.1.9" />
</group>
<group targetFramework="net6.0">
<dependency id="Csla" version="[4.6.3-Beta10]" />
<dependency id="Microsoft.AspNetCore.Components" version="6.0.8" />
<dependency id="Microsoft.AspNetCore.Components.Web" version="6.0.8" />
<dependency id="Microsoft.AspNetCore.Components.Authorization" version="6.0.8" />
<dependency id="Microsoft.AspNetCore.Components" version="6.0.25" />
<dependency id="Microsoft.AspNetCore.Components.Web" version="6.0.25" />
<dependency id="Microsoft.AspNetCore.Components.Authorization" version="6.0.25" />
</group>
<group targetFramework="net7.0">
<dependency id="Csla" version="[4.6.3-Beta10]" />
Expand All @@ -43,10 +37,6 @@
</dependencies>
</metadata>
<files>
<!-- NetStandard Assembly -->
<file src="..\..\bin\Release\netstandard2.1\**\Csla.Blazor.dll" target="lib\netstandard2.1" />
<file src="..\..\bin\Release\netstandard2.1\**\Csla.Blazor.pdb" target="lib\netstandard2.1" />
<file src="..\..\bin\Release\netstandard2.1\**\Csla.Blazor.xml" target="lib\netstandard2.1" />
<!-- Net8.0 Assembly -->
<file src="..\..\bin\Release\net8.0\**\Csla.Blazor.dll" target="lib\net8.0" />
<file src="..\..\bin\Release\net8.0\**\Csla.Blazor.pdb" target="lib\net8.0" />
Expand Down
10 changes: 2 additions & 8 deletions NuGet/Definition/Csla.Blazor.WebAssembly.NuSpec
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@
<description>UI helpers for using CSLA .NET business types with Blazor WebAssembly.</description>
<language>en-US</language>
<dependencies>
<group targetFramework="netstandard2.1">
<dependency id="Csla" version="[4.6.3-Beta10]" />
<dependency id="Csla.Blazor" version="[4.6.3-Beta10]" />
<dependency id="Microsoft.AspNetCore.Components.WebAssembly" version="3.2.0" />
</group>
<group targetFramework="net6.0">
<dependency id="Csla" version="[4.6.3-Beta10]" />
<dependency id="Csla.Blazor" version="[4.6.3-Beta10]" />
<dependency id="Microsoft.AspNetCore.Components.WebAssembly" version="6.0.2" />
<dependency id="Microsoft.AspNetCore.Components.WebAssembly" version="6.0.25" />
<dependency id="System.Net.Http.Json" version="6.0.1" />
</group>
<group targetFramework="net7.0">
<dependency id="Csla" version="[4.6.3-Beta10]" />
Expand All @@ -41,8 +37,6 @@
</dependencies>
</metadata>
<files>
<!-- NetStandard Assembly -->
<file src="..\..\bin\Release\netstandard2.1\**\Csla.Blazor.WebAssembly.*" target="lib\netstandard2.1" />
<!-- Net8.0 Assembly -->
<file src="..\..\bin\Release\net8.0\**\Csla.Blazor.WebAssembly.*" target="lib\net8.0" />
<!-- Net7.0 Assembly -->
Expand Down
3 changes: 2 additions & 1 deletion NuGet/Definition/Csla.NuSpec
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<dependency id="Microsoft.Extensions.Configuration.Binder" version="6.0.0" />
<dependency id="Microsoft.Extensions.DependencyInjection" version="6.0.0" />
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.4" />
<dependency id="System.ComponentModel.Annotations" version="5.0.0" />
<dependency id="System.Runtime.Loader" version="4.3.0" />
</group>
Expand All @@ -87,7 +88,7 @@
<dependency id="Microsoft.Extensions.DependencyInjection" version="7.0.0" />
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="7.0.0" />
<dependency id="Microsoft.Extensions.Hosting.Abstractions" version="7.0.0" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.0" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.1" />
<dependency id="System.ComponentModel.Annotations" version="5.0.0" />
<dependency id="System.Runtime.Loader" version="4.3.0" />
</group>
Expand Down
2 changes: 1 addition & 1 deletion NuGet/Definition/Csla.Uwp.NuSpec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependencies>
<group targetFramework="uap10.0">
<dependency id="Csla" version="[4.6.3-Beta10]" />
<dependency id="Microsoft.Extensions.Hosting" version="6.0.0" />
<dependency id="Microsoft.Extensions.Hosting" version="6.0.1" />
<dependency id="Microsoft.Extensions.Hosting.Abstractions" version="6.0.0" />
</group>
</dependencies>
Expand Down
12 changes: 2 additions & 10 deletions Source/Csla.AspNetCore/Csla.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<AssemblyName>Csla.AspNetCore</AssemblyName>
<RootNamespace>Csla.AspNetCore</RootNamespace>
<PackageId>Csla.AspNetCore</PackageId>
Expand All @@ -14,14 +14,6 @@

<Import Project="..\Csla.Web.Mvc.Shared\Csla.Web.Mvc.Shared.projitems" Label="Shared" />

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>NETSTANDARD2_0</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.0" />
Expand All @@ -34,7 +26,7 @@

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.25" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 3 additions & 7 deletions Source/Csla.Blazor.WebAssembly/Csla.Blazor.WebAssembly.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<Product>CSLA .NET Blazor WebAssembly</Product>
<Description>UI helpers for using CSLA .NET business types with Blazor WebAssembly.</Description>
Expand All @@ -20,13 +20,9 @@
<DefineConstants>TRACE;BLAZOR</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.8" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.25" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
Expand Down
14 changes: 4 additions & 10 deletions Source/Csla.Blazor/Csla.Blazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<Product>CSLA .NET Blazor</Product>
<Description>UI helpers for using CSLA .NET business types with Blazor.</Description>
Expand All @@ -20,12 +20,6 @@
<DefineConstants>TRACE;BLAZOR</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.28" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.28" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="3.1.28" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
Expand All @@ -39,9 +33,9 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.25" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 17 additions & 0 deletions Source/Csla.Blazor/PropertyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// </copyright>
// <summary>Exposes metastate for a property</summary>
//-----------------------------------------------------------------------
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using Csla.Rules;

Expand Down Expand Up @@ -134,6 +136,21 @@ public string InformationText
}
}

/// <summary>
/// Gets the list of broken rules for
/// a property on the Model
/// </summary>
public List<BrokenRule> BrokenRules
{
get
{
List<BrokenRule> result = [];
if (Model is Core.BusinessBase obj)
result = [.. obj.BrokenRulesCollection];
return result;
}
}

/// <summary>
/// Gets a value indicating whether the current user
/// is authorized to read the property on the Model
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla.Xaml.Uwp/Csla.Xaml.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting">
<Version>6.0.0</Version>
<Version>6.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions">
<Version>6.0.0</Version>
Expand Down
11 changes: 10 additions & 1 deletion Source/Csla/Core/MobileObservableCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,16 @@ protected virtual void OnSetChildren(SerializationInfo info, MobileFormatter for
foreach (int reference in references)
{
T child = (T)formatter.GetObject(reference);
this.Add(child);
if (child is IBusinessBase bb)
{
var editLevelAdded = bb.EditLevelAdded;
this.Add(child);
bb.EditLevelAdded = editLevelAdded;
}
else
{
this.Add(child);
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Csla/Csla.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
Expand All @@ -81,7 +81,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
Expand Down

0 comments on commit 3ea6545

Please sign in to comment.