Skip to content

Commit

Permalink
[ODS-6199] (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericstockdale authored Mar 19, 2024
1 parent 10ed5fb commit 922f24f
Show file tree
Hide file tree
Showing 58 changed files with 7,402 additions and 13,090 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/Lib edFi.ods.api pullrequest .yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup .NET
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
with:
dotnet-version: 3.1.x
- name: build
run: |
.\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj"
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/Lib edFi.ods.api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup .NET
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
with:
dotnet-version: 3.1.x
- name: build
run: |
.\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj"
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/Pkg EdFi.Ods.CodeGen pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ jobs:
runs-on: windows-latest

steps:
- name: Setup .NET
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
with:
dotnet-version: 3.1.x
- name: Support longpaths
run: git config --system core.longpaths true
- name: Checkout Ed-Fi-ODS
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/Pkg EdFi.Ods.CodeGen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
build:
runs-on: windows-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
with:
dotnet-version: 3.1.x
- name: Support longpaths
run: git config --system core.longpaths true
- name: Checkout Ed-Fi-ODS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>EdFi.Admin.DataAccess</PackageId>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<AssemblyName>EdFi.Admin.DataAccess</AssemblyName>
<RootNamespace>EdFi.Admin.DataAccess</RootNamespace>
Expand All @@ -16,10 +16,10 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EdFi.Suite3.Common" Version="5.3.18" />
<PackageReference Include="EdFi.Suite3.Common" Version="5.4.143" />
<PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="EntityFramework6.Npgsql" Version="6.4.1" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="EntityFramework6.Npgsql" Version="6.4.3" />
<PackageReference Include="log4net" Version="2.0.13" />
<PackageReference Include="Npgsql" Version="4.1.5" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Application/EdFi.Admin.DataAccess/Models/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private static string GenerateRandomString(int length = 24)
var numBytes = (length + 3) / 4 * 3;
var bytes = new byte[numBytes];

using (var rng = new RNGCryptoServiceProvider())
using (var rng = RandomNumberGenerator.Create())
{
do
{
Expand Down
6 changes: 3 additions & 3 deletions Application/EdFi.Common/EdFi.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
Expand All @@ -13,8 +13,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.10" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="log4net" Version="2.0.13" />
<PackageReference Include="Npgsql" Version="4.1.5" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Application/EdFi.Common/Security/HashHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class HashHelper
/// </summary>
/// <param name="stringToHash"></param>
/// <returns></returns>
public static byte[] GetSha256Hash(string stringToHash) => new SHA256Managed()
public static byte[] GetSha256Hash(string stringToHash) => SHA256.Create()
.ComputeHash(Encoding.UTF8.GetBytes(stringToHash), 0, Encoding.UTF8.GetByteCount(stringToHash));
}
}
}
4 changes: 2 additions & 2 deletions Application/EdFi.Ods.Api/Constants/ApiVersionConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public static class ApiVersionConstants
/// <summary>
/// Informational version of the ods api.
/// </summary>
public const string InformationalVersion = "5.3";
public const string InformationalVersion = "5.4";

/// <summary>
/// Semantic version of the ods api.
/// </summary>
public const string Version = "5.3";
public const string Version = "5.4";

/// <summary>
/// Suite version of the ods api.
Expand Down
34 changes: 18 additions & 16 deletions Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<PackageId>EdFi.Ods.Api</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>EdFi.Ods.Api</AssemblyName>
<AssemblyVersion>99.99.99.00</AssemblyVersion>
<RootNamespace>EdFi.Ods.Api</RootNamespace>
Expand All @@ -19,29 +19,31 @@
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="EdFi.Suite3.Admin.DataAccess" Version="5.3.54" />
<PackageReference Include="EdFi.Suite3.Common" Version="5.3.18" />
<PackageReference Include="EdFi.Suite3.Security.DataAccess" Version="5.3.63" />
<PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="3.1.1" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="3.1.1" />
<PackageReference Include="EdFi.Suite3.Admin.DataAccess" Version="5.4.105" />
<PackageReference Include="EdFi.Suite3.Common" Version="5.4.143" />
<PackageReference Include="EdFi.Suite3.Security.DataAccess" Version="5.4.143" />
<PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="FluentValidation" Version="8.6.3" />
<PackageReference Include="Iesi.Collections" Version="4.0.4" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.16.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.10" />
<PackageReference Include="log4net" Version="2.0.13" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="NHibernate" Version="5.2.7" />
<PackageReference Include="Npgsql" Version="4.1.5" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
<PackageReference Include="NHibernate" Version="5.3.10" />
<PackageReference Include="Npgsql" Version="6.0.3" />
<PackageReference Include="Polly" Version="7.2.2" />
<PackageReference Include="Remotion.Linq" Version="2.2.0" />
<PackageReference Include="Remotion.Linq.EagerFetching" Version="2.2.0" />
<PackageReference Include="Sandwych.QuickGraph.Core" Version="1.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
</ItemGroup>
Expand Down
25 changes: 25 additions & 0 deletions Application/EdFi.Ods.Api/EdFi.Ods.Api.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdFi.Ods.Api", "EdFi.Ods.Api.csproj", "{47F54A6A-8979-44BD-8757-1960A00DD83F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{47F54A6A-8979-44BD-8757-1960A00DD83F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47F54A6A-8979-44BD-8757-1960A00DD83F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47F54A6A-8979-44BD-8757-1960A00DD83F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47F54A6A-8979-44BD-8757-1960A00DD83F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3BBC3994-A8D4-40FA-A7D4-9FA0A498A6FB}
EndGlobalSection
EndGlobal
10 changes: 5 additions & 5 deletions Application/EdFi.Ods.Common/AssembliesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class AssembliesProvider : IAssembliesProvider

public Assembly[] GetAssemblies() => AppDomain.CurrentDomain.GetAssemblies();

public Assembly Get(string assemblyName) => GetAssemblies().FirstOrDefault(x=> x.GetName().Name.EqualsIgnoreCase(assemblyName));
public Assembly Get(string assemblyName) => GetAssemblies().FirstOrDefault(x => x.GetName().Name.EqualsIgnoreCase(assemblyName));

public Assembly[] GetAssembliesContaining<T>()
=> GetAssemblies()
Expand Down Expand Up @@ -49,7 +49,7 @@ IEnumerable<Assembly> GetPlugins()
{
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += (s, e) =>
{
var assembly = Assembly.ReflectionOnlyLoad(e.Name);
var assembly = Assembly.Load(e.Name);

if (assembly == null)
{
Expand All @@ -71,12 +71,12 @@ IEnumerable<Assembly> GetPlugins()
// return the assemblies that are only plugins and exclude non plugin assembles (e.g. log4net.dll)
foreach (FileInfo fileInfo in directoryInfo.GetFiles("*.dll", SearchOption.AllDirectories))
{
var assembly = Assembly.ReflectionOnlyLoadFrom(fileInfo.FullName);
var assembly = Assembly.Load(fileInfo.FullName);

// load in the referenced assemblies into the reflection domain
foreach (AssemblyName referencedAssembly in assembly.GetReferencedAssemblies())
{
Assembly.ReflectionOnlyLoad(referencedAssembly.FullName);
Assembly.Load(referencedAssembly.FullName);
}

if (assembly.GetTypes().Any(t =>
Expand Down Expand Up @@ -107,4 +107,4 @@ bool IsSuppliedPluginFolderName()
}

}
}
}
14 changes: 7 additions & 7 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.Ods.Common</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
Expand All @@ -16,20 +16,20 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EdFi.Suite3.Common" Version="5.3.18" />
<PackageReference Include="EdFi.Suite3.Common" Version="5.4.143" />
<PackageReference Include="FluentValidation" Version="8.6.3" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="log4net" Version="2.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NHibernate" Version="5.2.7" />
<PackageReference Include="NHibernate" Version="5.3.10" />
<PackageReference Include="Npgsql" Version="4.1.5" />
<PackageReference Include="Sandwych.QuickGraph.Core" Version="1.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.10" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<None Remove="Metadata\Schemas\Ed-Fi-ODS-API-Profiles.xsd" />
Expand Down
25 changes: 25 additions & 0 deletions Application/EdFi.Ods.Common/EdFi.Ods.Common.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdFi.Ods.Common", "EdFi.Ods.Common.csproj", "{1E8BF3B5-C92C-4835-A053-4CDD17147A51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1E8BF3B5-C92C-4835-A053-4CDD17147A51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E8BF3B5-C92C-4835-A053-4CDD17147A51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E8BF3B5-C92C-4835-A053-4CDD17147A51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E8BF3B5-C92C-4835-A053-4CDD17147A51}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61C65F7C-A307-49BC-BE5C-C4C5ECE61617}
EndGlobalSection
EndGlobal
38 changes: 3 additions & 35 deletions Application/EdFi.Ods.Common/Expando/Expando.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,38 +208,6 @@ public override bool TryGetMember(GetMemberBinder binder, out object result)
return false;
}

/// <summary>
/// Property setter implementation tries to retrieve value from instance
/// first then into this object
/// </summary>
/// <param name="binder"></param>
/// <param name="value"></param>
/// <returns></returns>
public override bool TrySetMember(SetMemberBinder binder, object value)
{
// first check to see if there's a native property to set
if (Instance != null)
{
try
{
bool result = SetProperty(Instance, binder.Name, value);

if (result)
{
return true;
}
}
catch (Exception ex)
{
throw ex;
}
}

// no match - set or add to dictionary
Properties[binder.Name.ToLowerInvariant()] = value;
return true;
}

/// <summary>
/// Dynamic invocation method. Currently allows only for Reflection based
/// operation (no ability to add methods dynamically).
Expand Down Expand Up @@ -289,7 +257,7 @@ protected bool GetProperty(object instance, string name, out object result)

if (mi.MemberType == MemberTypes.Property)
{
result = ((PropertyInfo) mi).GetValue(instance, null);
result = ((PropertyInfo)mi).GetValue(instance, null);
return true;
}
}
Expand Down Expand Up @@ -320,7 +288,7 @@ protected bool SetProperty(object instance, string name, object value)

if (mi.MemberType == MemberTypes.Property)
{
((PropertyInfo) mi).SetValue(Instance, value, null);
((PropertyInfo)mi).SetValue(Instance, value, null);
return true;
}
}
Expand Down Expand Up @@ -410,4 +378,4 @@ public bool Contains(KeyValuePair<string, object> item, bool includeInstanceProp
return false;
}
}
}
}
Loading

0 comments on commit 922f24f

Please sign in to comment.