Skip to content

Commit

Permalink
Refactored code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mahara committed Dec 11, 2023
1 parent edaf5c1 commit 4edbc28
Show file tree
Hide file tree
Showing 48 changed files with 787 additions and 649 deletions.
4 changes: 1 addition & 3 deletions buildscripts/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#region License
// Copyright 2004-2024 Castle Project - https://www.castleproject.org/
// Copyright 2004-2024 Castle Project - https://www.castleproject.org/x
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -14,8 +14,6 @@
// limitations under the License.
#endregion

using System;

[assembly: CLSCompliant(true)]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public virtual void TearDown()
OnTearDown();
DropDatabaseSchemas();
Container.Dispose();
Container = null;
Container = null!;
}

protected virtual void OnTearDown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,31 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Castle.Core" />
<PackageReference Include="Castle.Facilities.AutoTx" />
<PackageReference Include="Castle.LoggingFacility" />
<PackageReference Include="Castle.Services.Transaction" />
<PackageReference Include="Castle.Windsor" />
<PackageReference Include="LiquidTestReports.Markdown" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" />
<PackageReference Include="Moq" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NHibernate" />
<PackageReference Include="NUnit" />
<PackageReference Include="Castle.Core" />
<PackageReference Include="Castle.Facilities.AutoTx" />
<PackageReference Include="Castle.LoggingFacility" />
<PackageReference Include="Castle.Services.Transaction" />
<PackageReference Include="Castle.Windsor" />
<PackageReference Include="LiquidTestReports.Markdown" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" />
<PackageReference Include="Moq" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NHibernate" />
<PackageReference Include="Nullable">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="NUnitLite" />
<PackageReference Include="NunitXml.TestLogger" />
<PackageReference Include="System.Data.SqlClient" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="NUnitLite" />
<PackageReference Include="NunitXml.TestLogger" />
<PackageReference Include="System.Data.SqlClient" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net7.0' OR '$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Blog()

public virtual int Id { get; set; }

public virtual string Name { get; set; }
public virtual string Name { get; set; } = string.Empty;

public virtual IList<BlogItem> Items { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public class BlogItem
{
public virtual int Id { get; set; }

public virtual Blog ParentBlog { get; set; }
public virtual Blog? ParentBlog { get; set; }

public virtual string Title { get; set; }
public virtual string Title { get; set; } = string.Empty;

public virtual string Text { get; set; }
public virtual string Text { get; set; } = string.Empty;

public virtual DateTime DateTime { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class BlogRef
{
public virtual int Id { get; set; }

public virtual Blog ParentBlog { get; set; }
public virtual Blog? ParentBlog { get; set; }

public virtual string Title { get; set; }
public virtual string Title { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ public void ResetState()

#region IInterceptor Members

public override int[] FindDirty(object entity,
object id,
object[] currentState,
object[] previousState,
string[] propertyNames,
IType[] types)
public override int[]? FindDirty(object entity,
object id,
object[] currentState,
object[] previousState,
string[] propertyNames,
IType[] types)
{
return null;
}

public override object Instantiate(string clazz, object id)
public override object? Instantiate(string clazz, object id)
{
_instantiationCall = true;

Expand Down
Loading

0 comments on commit 4edbc28

Please sign in to comment.