diff --git a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPerson.razor b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPerson.razor
index 3a6209d1f9..a6aa29eefb 100644
--- a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPerson.razor
+++ b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPerson.razor
@@ -82,8 +82,8 @@ else
vm.ModelPropertyChanged += async (s, e) => await InvokeAsync(() => StateHasChanged());
if (string.IsNullOrWhiteSpace(id))
- await vm.RefreshAsync(() => personEditPortal.CreateAsync());
+ await vm.RefreshAsync(async () => (PersonEdit?)(await personEditPortal.CreateAsync()));
else
- await vm.RefreshAsync(() => personEditPortal.FetchAsync(int.Parse(id)));
+ await vm.RefreshAsync(async () => (PersonEdit?)(await personEditPortal.FetchAsync(int.Parse(id))));
}
}
diff --git a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPersonViaForm.razor b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPersonViaForm.razor
index d7ff428115..8e5edc7fa4 100644
--- a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPersonViaForm.razor
+++ b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/EditPersonViaForm.razor
@@ -56,8 +56,8 @@ else
vm.ModelPropertyChanged += async (s, e) => await InvokeAsync(() => StateHasChanged());
if (string.IsNullOrWhiteSpace(id))
- await vm.RefreshAsync(() => personEditPortal.CreateAsync());
+ await vm.RefreshAsync(async () => (PersonEdit?)(await personEditPortal.CreateAsync()));
else
- await vm.RefreshAsync(() => personEditPortal.FetchAsync(int.Parse(id)));
+ await vm.RefreshAsync(async () => (PersonEdit?)(await personEditPortal.FetchAsync(int.Parse(id))));
}
}
diff --git a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/ListPersons.razor b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/ListPersons.razor
index 762260dee5..29e244d976 100644
--- a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/ListPersons.razor
+++ b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/ListPersons.razor
@@ -42,6 +42,6 @@ else
{
// Every page _must_ initialize the state manager
await StateManager.InitializeAsync();
- await vm.RefreshAsync(() => personListPortal.FetchAsync());
+ await vm.RefreshAsync(async () => (PersonList?)(await personListPortal.FetchAsync()));
}
}
\ No newline at end of file
diff --git a/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj b/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj
index f0d1de92f7..24ee6423c5 100644
--- a/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj
+++ b/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj
@@ -4,10 +4,12 @@
net9.0
enable
enable
+ true
+
diff --git a/Samples/BlazorExample/BlazorExample/BusinessLibrary/CheckCase.cs b/Samples/BlazorExample/BlazorExample/BusinessLibrary/CheckCase.cs
index d1300d7566..30d6a6fe56 100644
--- a/Samples/BlazorExample/BlazorExample/BusinessLibrary/CheckCase.cs
+++ b/Samples/BlazorExample/BlazorExample/BusinessLibrary/CheckCase.cs
@@ -10,7 +10,7 @@ public CheckCase(Csla.Core.IPropertyInfo primaryProperty)
protected override void Execute(IRuleContext context)
{
- var text = (string)ReadProperty(context.Target, PrimaryProperty);
+ var text = (string?)ReadProperty(context.Target!, PrimaryProperty!);
if (string.IsNullOrWhiteSpace(text)) return;
var ideal = text.Substring(0, 1).ToUpper();
ideal += text.Substring(1).ToLower();
diff --git a/Samples/BlazorExample/BlazorExample/BusinessLibrary/LetterCount.cs b/Samples/BlazorExample/BlazorExample/BusinessLibrary/LetterCount.cs
index 891d4337c6..2eb4425f92 100644
--- a/Samples/BlazorExample/BlazorExample/BusinessLibrary/LetterCount.cs
+++ b/Samples/BlazorExample/BlazorExample/BusinessLibrary/LetterCount.cs
@@ -12,8 +12,8 @@ public LetterCount(Csla.Core.IPropertyInfo primaryProperty, Csla.Core.IPropertyI
protected override void Execute(IRuleContext context)
{
- var text = (string)ReadProperty(context.Target, PrimaryProperty);
- var count = text.Length;
+ var text = (string?)ReadProperty(context.Target!, PrimaryProperty!);
+ var count = text?.Length ?? 0;
context.AddOutValue(AffectedProperties[1], count);
}
}
diff --git a/Samples/BlazorExample/BlazorExample/BusinessLibrary/NoZAllowed.cs b/Samples/BlazorExample/BlazorExample/BusinessLibrary/NoZAllowed.cs
index dba495744f..e831a3d84a 100644
--- a/Samples/BlazorExample/BlazorExample/BusinessLibrary/NoZAllowed.cs
+++ b/Samples/BlazorExample/BlazorExample/BusinessLibrary/NoZAllowed.cs
@@ -10,8 +10,8 @@ public NoZAllowed(Csla.Core.IPropertyInfo primaryProperty)
protected override void Execute(IRuleContext context)
{
- var text = (string)ReadProperty(context.Target, PrimaryProperty);
- if (text.ToLower().Contains("z"))
+ var text = (string?)ReadProperty(context.Target!, PrimaryProperty!);
+ if (text?.ToLower().Contains("z") ?? false)
context.AddErrorResult("No letter Z allowed");
}
}
diff --git a/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonEdit.cs b/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonEdit.cs
index 486a127404..e12cf8e7bf 100644
--- a/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonEdit.cs
+++ b/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonEdit.cs
@@ -4,30 +4,15 @@
namespace BusinessLibrary
{
- [Serializable]
- public class PersonEdit : BusinessBase
+ [CslaImplementProperties]
+ public partial class PersonEdit : BusinessBase
{
- public static readonly PropertyInfo IdProperty = RegisterProperty(nameof(Id));
- public int Id
- {
- get { return GetProperty(IdProperty); }
- set { SetProperty(IdProperty, value); }
- }
+ public partial int Id { get; private set; }
- public static readonly PropertyInfo NameProperty = RegisterProperty(nameof(Name));
[Required]
- public string Name
- {
- get { return GetProperty(NameProperty); }
- set { SetProperty(NameProperty, value); }
- }
+ public partial string? Name { get; set; }
- public static readonly PropertyInfo NameLengthProperty = RegisterProperty(nameof(NameLength));
- public int NameLength
- {
- get => GetProperty(NameLengthProperty);
- set => SetProperty(NameLengthProperty, value);
- }
+ public partial int NameLength { get; private set; }
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[ObjectAuthorizationRules]
@@ -53,58 +38,49 @@ protected override void AddBusinessRules()
[Create]
private void Create()
{
- Id = -1;
- base.Child_Create();
+ LoadProperty(IdProperty, -1);
}
[Fetch]
- private void Fetch(int id, [Inject]DataAccess.IPersonDal dal)
+ private void Fetch(int id, [Inject] DataAccess.IPersonDal dal)
{
var data = dal.Get(id);
- using (BypassPropertyChecks)
- Csla.Data.DataMapper.Map(data, this);
+ Csla.Data.DataMapper.Map(data, this);
BusinessRules.CheckRules();
}
[Insert]
- private void Insert([Inject]DataAccess.IPersonDal dal)
+ private void Insert([Inject] DataAccess.IPersonDal dal)
{
- using (BypassPropertyChecks)
+ var data = new DataAccess.PersonEntity
{
- var data = new DataAccess.PersonEntity
- {
- Name = Name
- };
- var result = dal.Insert(data);
- Id = result.Id;
- }
+ Name = Name
+ };
+ var result = dal.Insert(data);
+ LoadProperty(IdProperty, result.Id);
}
[Update]
- private void Update([Inject]DataAccess.IPersonDal dal)
+ private void Update([Inject] DataAccess.IPersonDal dal)
{
- using (BypassPropertyChecks)
+ var data = new DataAccess.PersonEntity
{
- var data = new DataAccess.PersonEntity
- {
- Id = Id,
- Name = Name
- };
- dal.Update(data);
- }
+ Id = Id,
+ Name = Name
+ };
+ dal.Update(data);
}
[DeleteSelf]
- private void DeleteSelf([Inject]DataAccess.IPersonDal dal)
+ private void DeleteSelf([Inject] DataAccess.IPersonDal dal)
{
- Delete(ReadProperty(IdProperty), dal);
+ Delete(Id, dal);
}
[Delete]
- private void Delete(int id, [Inject]DataAccess.IPersonDal dal)
+ private void Delete(int id, [Inject] DataAccess.IPersonDal dal)
{
dal.Delete(id);
}
-
}
}
diff --git a/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonInfo.cs b/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonInfo.cs
index decd4d62cf..959b0886ec 100644
--- a/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonInfo.cs
+++ b/Samples/BlazorExample/BlazorExample/BusinessLibrary/PersonInfo.cs
@@ -2,28 +2,18 @@
namespace BusinessLibrary
{
- [Serializable]
- public class PersonInfo : ReadOnlyBase
+ [CslaImplementProperties]
+ public partial class PersonInfo : ReadOnlyBase
{
- public static readonly PropertyInfo IdProperty = RegisterProperty(nameof(Id));
- public int Id
- {
- get { return GetProperty(IdProperty); }
- private set { LoadProperty(IdProperty, value); }
- }
+ public partial int Id { get; private set; }
- public static readonly PropertyInfo NameProperty = RegisterProperty(nameof(Name));
- public string Name
- {
- get { return GetProperty(NameProperty); }
- private set { LoadProperty(NameProperty, value); }
- }
+ public partial string? Name { get; private set; }
[FetchChild]
private void Fetch(DataAccess.PersonEntity data)
{
- Id = data.Id;
- Name = data.Name;
+ LoadProperty(IdProperty, data.Id);
+ LoadProperty(NameProperty, data.Name);
}
}
}
\ No newline at end of file
diff --git a/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj b/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj
index 32b4a38b4a..9031da74fc 100644
--- a/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj
+++ b/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj
@@ -2,6 +2,8 @@
net9.0
+ enable
+ enable
diff --git a/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj b/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj
index 76fa23bf9a..d8c5a19d00 100644
--- a/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj
+++ b/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj
@@ -2,6 +2,8 @@
net9.0
+ enable
+ enable
DataAccess.Mock
diff --git a/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj b/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj
index 1cdc2f0a17..09fc3f59e3 100644
--- a/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj
+++ b/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj
@@ -2,6 +2,8 @@
net9.0
+ enable
+ enable
diff --git a/Samples/BlazorExample/BlazorExample/DataAccess/PersonEntity.cs b/Samples/BlazorExample/BlazorExample/DataAccess/PersonEntity.cs
index 093403441a..e8087b313c 100644
--- a/Samples/BlazorExample/BlazorExample/DataAccess/PersonEntity.cs
+++ b/Samples/BlazorExample/BlazorExample/DataAccess/PersonEntity.cs
@@ -7,6 +7,6 @@ namespace DataAccess
public class PersonEntity
{
public int Id { get; set; }
- public string Name { get; set; }
+ public string? Name { get; set; }
}
}
diff --git a/Samples/BlazorExample/Directory.Packages.props b/Samples/BlazorExample/Directory.Packages.props
index f70ae17d1e..6369fa758e 100644
--- a/Samples/BlazorExample/Directory.Packages.props
+++ b/Samples/BlazorExample/Directory.Packages.props
@@ -1,13 +1,14 @@
true
- 9.0.0-alpha-g27c299cae5
+ 10.0.0-alpha-0009-g2abd6121c5
-
-
-
-
+
+
+
+
+
diff --git a/Source/Csla.Generators/cs/AutoImplementProperties/Csla.Generator.AutoImplementProperties.CSharp/Csla.Generator.AutoImplementProperties.CSharp.csproj b/Source/Csla.Generators/cs/AutoImplementProperties/Csla.Generator.AutoImplementProperties.CSharp/Csla.Generator.AutoImplementProperties.CSharp.csproj
index 7b3a119b74..95b278a284 100644
--- a/Source/Csla.Generators/cs/AutoImplementProperties/Csla.Generator.AutoImplementProperties.CSharp/Csla.Generator.AutoImplementProperties.CSharp.csproj
+++ b/Source/Csla.Generators/cs/AutoImplementProperties/Csla.Generator.AutoImplementProperties.CSharp/Csla.Generator.AutoImplementProperties.CSharp.csproj
@@ -26,7 +26,7 @@
true
- true
+ false
true
diff --git a/Source/Csla.Generators/cs/AutoSerialization/Csla.Generator.AutoSerialization.CSharp/Csla.Generator.AutoSerialization.CSharp.csproj b/Source/Csla.Generators/cs/AutoSerialization/Csla.Generator.AutoSerialization.CSharp/Csla.Generator.AutoSerialization.CSharp.csproj
index b43d99519a..0149faf4a9 100644
--- a/Source/Csla.Generators/cs/AutoSerialization/Csla.Generator.AutoSerialization.CSharp/Csla.Generator.AutoSerialization.CSharp.csproj
+++ b/Source/Csla.Generators/cs/AutoSerialization/Csla.Generator.AutoSerialization.CSharp/Csla.Generator.AutoSerialization.CSharp.csproj
@@ -26,7 +26,7 @@
true
- true
+ false
true
diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props
index 4cd8b6ed12..550600d8be 100644
--- a/Source/Directory.Build.props
+++ b/Source/Directory.Build.props
@@ -9,7 +9,6 @@
- 10.0.0.0
MIT
https://cslanet.com
https://github.com/MarimerLLC/csla
@@ -24,4 +23,11 @@
en-US
$(SolutionDir)Csla\CslaKey.snk
+
+
+
+ all
+ 3.8.118
+
+
\ No newline at end of file
diff --git a/Source/Directory.Package.props b/Source/Directory.Package.props
index 9d04c7dc30..71021d7fe1 100644
--- a/Source/Directory.Package.props
+++ b/Source/Directory.Package.props
@@ -1,19 +1,6 @@
-
-
-
-
-
-
-
- @(VersionJsonLines)
- $([System.Text.RegularExpressions.Regex]::Match($(VersionJsonContent), '"version"\s*:\s*"([^"]+)"').Groups[1].Value)
-
-
-
- $(PackageVersionFromJson)
MIT
https://cslanet.com
..\..\bin\packages\
@@ -37,20 +24,6 @@
False
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
- $(PackageVersionFromJson)
-
-
-
diff --git a/Source/tests/Csla.Analyzers.Tests/Properties/AssemblyInfo.cs b/Source/tests/Csla.Analyzers.Tests/Properties/AssemblyInfo.cs
index 73dee0cbf4..b5f403cb70 100644
--- a/Source/tests/Csla.Analyzers.Tests/Properties/AssemblyInfo.cs
+++ b/Source/tests/Csla.Analyzers.Tests/Properties/AssemblyInfo.cs
@@ -3,5 +3,3 @@
[assembly: AssemblyTitle("Csla.Analyzers")]
[assembly: AssemblyProduct("Csla.Analyzers")]
[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/Source/tests/Csla.test/Properties/AssemblyInfo.cs b/Source/tests/Csla.test/Properties/AssemblyInfo.cs
index 71e6a45a48..90953b3385 100644
--- a/Source/tests/Csla.test/Properties/AssemblyInfo.cs
+++ b/Source/tests/Csla.test/Properties/AssemblyInfo.cs
@@ -27,15 +27,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c83f79e5-ed07-4c9e-b436-217b5eb03d65")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("4.5.30.0")]
-[assembly: AssemblyFileVersion("4.5.30.0")]
diff --git a/Source/tests/Csla.test/Serialization/SerializationTests.cs b/Source/tests/Csla.test/Serialization/SerializationTests.cs
index c682f2e012..aea6a5d069 100644
--- a/Source/tests/Csla.test/Serialization/SerializationTests.cs
+++ b/Source/tests/Csla.test/Serialization/SerializationTests.cs
@@ -435,7 +435,7 @@ public void TestSerializationNames()
Assert.AreEqual("Csla.ApplicationContext, /c", AssemblyNameTranslator.GetSerializationName(typeof(ApplicationContext), false));
Assert.AreEqual("Csla.ApplicationContext, /c", AssemblyNameTranslator.GetSerializationName(typeof(ApplicationContext), true));
Assert.AreEqual("Csla.Test.Serialization.BinaryReaderWriterTestClass, Csla.Tests", AssemblyNameTranslator.GetSerializationName(typeof(BinaryReaderWriterTestClass), false));
- Assert.AreEqual("Csla.Test.Serialization.BinaryReaderWriterTestClass, Csla.Tests, Version=4.5.30.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30", AssemblyNameTranslator.GetSerializationName(typeof(BinaryReaderWriterTestClass), true));
+ Assert.AreEqual("Csla.Test.Serialization.BinaryReaderWriterTestClass, Csla.Tests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30", AssemblyNameTranslator.GetSerializationName(typeof(BinaryReaderWriterTestClass), true));
}
// TODO: fix test
diff --git a/Source/version.json b/Source/version.json
index d820711bec..d35f6d505c 100644
--- a/Source/version.json
+++ b/Source/version.json
@@ -1,13 +1,14 @@
{
- "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
- "version": "10.0.0-alpha.3",
+ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
+ "version": "10.0.0-alpha.10",
"publicReleaseRefSpec": [
- "^refs/heads/.*"
+ "^refs/heads/main$",
+ "^refs/heads/release$",
+ "^refs/heads/v\\d+(?:\\.\\d+)?$"
],
- "nuGetPackageVersion": {
- "semVer": 2
- },
- "assemblyVersion": {
- "precision": "build"
+ "cloudBuild": {
+ "buildNumber": {
+ "enabled": false
+ }
}
-}
+}
\ No newline at end of file
diff --git a/docs/dev/Create-a-CSLA-.NET-release.md b/docs/dev/Create-a-CSLA-.NET-release.md
index 53a54c3fc1..fc16804f1a 100644
--- a/docs/dev/Create-a-CSLA-.NET-release.md
+++ b/docs/dev/Create-a-CSLA-.NET-release.md
@@ -22,6 +22,7 @@ CSLA .NET, starting with version 4.9.0, follows the [semantic versioning (semver
1. Pull the latest code from MarimerLLC/csla
1. Open the `Source/version.json` file and update the version number
+1. ⚠️ Commit the change to git ⚠️
1. Do NuGet release
1. Open a terminal window
1. Change to the `csla/Source` folder