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

[ODS-6148] Migrate EdFi.Ods.Common to .NET 8 #931

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 6 additions & 8 deletions Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<PackageId>EdFi.Suite3.Ods.Common</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
Expand Down Expand Up @@ -30,19 +30,17 @@
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="6.0.1" />
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="FluentValidation" Version="11.4.0" />
<PackageReference Include="FluentValidation" Version="11.9.0" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="MediatR" Version="12.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NHibernate" Version="5.4.0" />
<PackageReference Include="Npgsql" Version="7.0.6" />
<PackageReference Include="Sandwych.QuickGraph.Core" Version="1.0.0" />
<PackageReference Include="Standart.Hash.xxHash" Version="4.0.5" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<None Remove="Metadata\Schemas\Ed-Fi-ODS-API-Profiles.xsd" />
Expand All @@ -57,4 +55,4 @@
<ItemGroup>
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="LICENSE.txt" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Exceptions
{
/// <summary>
/// Thrown when a problem is detected in the API security configuration that prevents API requests from safely being served.
/// </summary>
[Serializable]
public class ApiSecurityConfigurationException : Exception
{
// For guidelines regarding the creation of new exception types, see
Expand All @@ -28,11 +26,5 @@ public ApiSecurityConfigurationException(string message) : base(message)
public ApiSecurityConfigurationException(string message, Exception inner) : base(message, inner)
{
}

protected ApiSecurityConfigurationException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
}
}
4 changes: 0 additions & 4 deletions Application/EdFi.Ods.Common/Exceptions/BadRequestException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Exceptions
{
Expand All @@ -17,8 +16,5 @@ public BadRequestException(string message)

public BadRequestException(string message, Exception innerException)
: base(message, innerException) { }

protected BadRequestException(SerializationInfo info, StreamingContext context)
: base(info, context) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Exceptions
{
[Serializable]
public class DatabaseConnectionException : Exception
{

Expand All @@ -19,10 +17,5 @@ public DatabaseConnectionException(string message)

public DatabaseConnectionException(string message, Exception inner)
: base(message, inner) { }

protected DatabaseConnectionException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Exceptions
{
[Serializable]
public class DistributedCacheException : Exception
{
// For guidelines regarding the creation of new exception types, see
Expand All @@ -21,19 +19,21 @@ public DistributedCacheException(string message)

public DistributedCacheException(string message, Exception inner)
: base(message, inner) { }

protected DistributedCacheException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }
}

[Serializable]
public class SafeDistributedCacheException : DistributedCacheException
{
public override string StackTrace => "See log for details";

public SafeDistributedCacheException(string message)
: base(message) { }

public SafeDistributedCacheException() : base()
{
}

public SafeDistributedCacheException(string message, Exception inner) : base(message, inner)
{
}
}
}
7 changes: 0 additions & 7 deletions Application/EdFi.Ods.Common/Exceptions/NotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Exceptions
{
/// <summary>
/// Indicates that a resource or persistent model identified for an operation was not found.
/// </summary>
[Serializable]
public class NotFoundException : Exception
{
// For guidelines regarding the creation of new exception types, see
Expand All @@ -32,11 +30,6 @@ public NotFoundException(string message, string typeName, string identifier)
public NotFoundException(string message, Exception inner)
: base(message, inner) { }

protected NotFoundException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }

public string TypeName { get; set; }

public string Identifier { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Exceptions
{
[Serializable]
public class NotModifiedException : Exception
{
// For guidelines regarding the creation of new exception types, see
Expand All @@ -21,10 +19,5 @@ public NotModifiedException(string message)

public NotModifiedException(string message, Exception inner)
: base(message, inner) { }

protected NotModifiedException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;
using EdFi.Ods.Common.Utils.Profiles;

namespace EdFi.Ods.Common.Exceptions;
Expand All @@ -27,8 +26,13 @@ public ProfileContentTypeUsageException(string message, string profileName, Cont
ContentTypeUsage = contentTypeUsage;
}

protected ProfileContentTypeUsageException(SerializationInfo info, StreamingContext context)
: base(info, context) { }
public ProfileContentTypeUsageException(string message) : base(message)
{
}

public ProfileContentTypeUsageException(string message, Exception innerException) : base(message, innerException)
{
}

public string ProfileName { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Models.Resource
{
[Serializable]
public class ProfileContentTypeException : Exception
{
public ProfileContentTypeException() { }
Expand All @@ -18,10 +16,5 @@ public ProfileContentTypeException(string message)

public ProfileContentTypeException(string message, Exception inner)
: base(message, inner) { }

protected ProfileContentTypeException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Security.Claims
{
[Serializable]
public class AuthorizationContextException : Exception
{
//
Expand All @@ -25,10 +23,5 @@ public AuthorizationContextException(string message)

public AuthorizationContextException(string message, Exception inner)
: base(message, inner) { }

protected AuthorizationContextException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Security
{
[Serializable]
public class EdFiSecurityConflictException : Exception
{
public EdFiSecurityConflictException() { }
Expand Down Expand Up @@ -42,11 +40,6 @@ public EdFiSecurityConflictException(string message, string resource, string act
public EdFiSecurityConflictException(string message, Exception inner)
: base(message, inner) { }

protected EdFiSecurityConflictException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }

public string ApiKey { get; }

public string Resource { get; }
Expand Down
7 changes: 0 additions & 7 deletions Application/EdFi.Ods.Common/Security/EdFiSecurityException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
// See the LICENSE and NOTICES files in the project root for more information.

using System;
using System.Runtime.Serialization;

namespace EdFi.Ods.Common.Security
{
[Serializable]
public class EdFiSecurityException : Exception
{
public EdFiSecurityException() { }
Expand Down Expand Up @@ -42,11 +40,6 @@ public EdFiSecurityException(string message, string resource, string action, str
public EdFiSecurityException(string message, Exception inner)
: base(message, inner) { }

protected EdFiSecurityException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }

public string ApiKey { get; }

public string Resource { get; }
Expand Down
Loading