diff --git a/BlueWest.Api/BlueWest.Api.csproj b/BlueWest.Api/BlueWest.Api.csproj
index c757849..971d059 100644
--- a/BlueWest.Api/BlueWest.Api.csproj
+++ b/BlueWest.Api/BlueWest.Api.csproj
@@ -4,6 +4,7 @@
net6.0
10
BlueWest.WebApi
+ true
@@ -16,8 +17,8 @@
+
-
diff --git a/BlueWest.Api/Controllers/UserController.cs b/BlueWest.Api/Controllers/UserController.cs
index 93f3eb7..c6b320a 100644
--- a/BlueWest.Api/Controllers/UserController.cs
+++ b/BlueWest.Api/Controllers/UserController.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
-using BlueWest.Collections;
using BlueWest.Data;
using BlueWest.WebApi.MySQL;
using Microsoft.AspNetCore.Http;
diff --git a/BlueWest.Api/Program.cs b/BlueWest.Api/Program.cs
index 98c63ad..b7c4288 100644
--- a/BlueWest.Api/Program.cs
+++ b/BlueWest.Api/Program.cs
@@ -6,7 +6,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using BlueWest.Collections;
using BlueWest.Core;
using BlueWest.Tools;
@@ -15,7 +14,7 @@ namespace BlueWest.WebApi
public class Program
{
public static readonly EventManager EventManager =
- new EventManager(new FastDictionary>(10000));
+ new EventManager(new Dictionary>(10000));
private static ThreadServer _threadServer;
diff --git a/BlueWest.Api/Protos/greet.proto b/BlueWest.Api/Protos/greet.proto
deleted file mode 100644
index b70b6d9..0000000
--- a/BlueWest.Api/Protos/greet.proto
+++ /dev/null
@@ -1,13 +0,0 @@
-syntax = "proto3";
-
-service Greeter {
-rpc SayHello (HelloRequest) returns (HelloReply);
-}
-
-message HelloRequest {
-string name = 1;
-}
-
-message HelloReply {
-string message = 1;
-}
\ No newline at end of file
diff --git a/BlueWest.Api/Service/CommandService.cs b/BlueWest.Api/Service/CommandService.cs
deleted file mode 100644
index d61a21d..0000000
--- a/BlueWest.Api/Service/CommandService.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace BlueWest.WebApi.Service
-{
- public readonly struct CommandEvent
- {
-
- }
- public class CommandService
- {
-
- }
-}
\ No newline at end of file
diff --git a/BlueWest.Api/Service/GreeterService.cs b/BlueWest.Api/Service/GreeterService.cs
deleted file mode 100644
index 5124c7d..0000000
--- a/BlueWest.Api/Service/GreeterService.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Microsoft.Extensions.Logging;
-
-namespace BlueWest.WebApi.Service
-{
- public class GreeterService : Greeter.GreeterBase
- {
- public GreeterService(ILogger logger)
- {
- }
- }
-}
\ No newline at end of file
diff --git a/BlueWest.Api/Startup.cs b/BlueWest.Api/Startup.cs
index e6e1efc..3eb97c4 100644
--- a/BlueWest.Api/Startup.cs
+++ b/BlueWest.Api/Startup.cs
@@ -11,12 +11,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BlueWest.WebApi.MySQL;
-using BlueWest.WebApi.Service;
using BlueWest.WebApi.Tools;
using Microsoft.EntityFrameworkCore;
using Microsoft.OpenApi.Models;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Serialization;
namespace BlueWest.WebApi
{
@@ -34,13 +31,13 @@ namespace BlueWest.WebApi
{
services.AddCors(options =>
{
- options.AddPolicy(name: MyAllowSpecificOrigins,
+ /*options.AddPolicy(name: MyAllowSpecificOrigins,
builder =>
{
builder.WithOrigins("http://localhost", "http://127.0.0.1", "http://localhost:3000",
"http://127.0.0.1:3000", "localhost:3000", "127.0.0.1:3000")
.AllowAnyHeader().AllowAnyMethod();
- });
+ });*/
});
services.AddControllers();
@@ -67,7 +64,7 @@ namespace BlueWest.WebApi
- services.AddGrpc();
+ // services.AddGrpc();
}
@@ -93,7 +90,7 @@ namespace BlueWest.WebApi
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
- endpoints.MapGrpcService();
+ // endpoints.MapGrpcService();
});
}
diff --git a/BlueWest.Api/xoxo/babe/BlueWest.Api.deps.json b/BlueWest.Api/xoxo/babe/BlueWest.Api.deps.json
new file mode 100644
index 0000000..55c520a
--- /dev/null
+++ b/BlueWest.Api/xoxo/babe/BlueWest.Api.deps.json
@@ -0,0 +1,589 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "BlueWest.Api/1.0.0": {
+ "dependencies": {
+ "BlueWest": "1.0.0",
+ "BlueWest.Data": "1.0.0",
+ "Grpc.AspNetCore": "2.41.0",
+ "Grpc.AspNetCore.Server": "2.41.0",
+ "Grpc.AspNetCore.Web": "2.41.0",
+ "Pomelo.EntityFrameworkCore.MySql": "6.0.2",
+ "Swashbuckle.AspNetCore": "5.6.3",
+ "Swashbuckle.AspNetCore.Swagger": "6.2.3"
+ },
+ "runtime": {
+ "BlueWest.Api.dll": {}
+ }
+ },
+ "Google.Protobuf/3.18.0": {
+ "runtime": {
+ "lib/net5.0/Google.Protobuf.dll": {
+ "assemblyVersion": "3.18.0.0",
+ "fileVersion": "3.18.0.0"
+ }
+ }
+ },
+ "Grpc.AspNetCore/2.41.0": {
+ "dependencies": {
+ "Google.Protobuf": "3.18.0",
+ "Grpc.AspNetCore.Server.ClientFactory": "2.41.0",
+ "Grpc.Tools": "2.41.0"
+ }
+ },
+ "Grpc.AspNetCore.Server/2.41.0": {
+ "dependencies": {
+ "Grpc.Net.Common": "2.41.0"
+ },
+ "runtime": {
+ "lib/net6.0/Grpc.AspNetCore.Server.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.41.0.0"
+ }
+ }
+ },
+ "Grpc.AspNetCore.Server.ClientFactory/2.41.0": {
+ "dependencies": {
+ "Grpc.AspNetCore.Server": "2.41.0",
+ "Grpc.Net.ClientFactory": "2.41.0"
+ },
+ "runtime": {
+ "lib/net6.0/Grpc.AspNetCore.Server.ClientFactory.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.41.0.0"
+ }
+ }
+ },
+ "Grpc.AspNetCore.Web/2.41.0": {
+ "runtime": {
+ "lib/net6.0/Grpc.AspNetCore.Web.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.41.0.0"
+ }
+ }
+ },
+ "Grpc.Core.Api/2.41.0": {
+ "dependencies": {
+ "System.Memory": "4.5.3"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Grpc.Core.Api.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.41.0.0"
+ }
+ }
+ },
+ "Grpc.Net.Client/2.41.0": {
+ "dependencies": {
+ "Grpc.Net.Common": "2.41.0",
+ "Microsoft.Extensions.Logging.Abstractions": "6.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Grpc.Net.Client.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.41.0.0"
+ }
+ }
+ },
+ "Grpc.Net.ClientFactory/2.41.0": {
+ "dependencies": {
+ "Grpc.Net.Client": "2.41.0",
+ "Microsoft.Extensions.Http": "3.0.3"
+ },
+ "runtime": {
+ "lib/net6.0/Grpc.Net.ClientFactory.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.41.0.0"
+ }
+ }
+ },
+ "Grpc.Net.Common/2.41.0": {
+ "dependencies": {
+ "Grpc.Core.Api": "2.41.0"
+ },
+ "runtime": {
+ "lib/net6.0/Grpc.Net.Common.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.41.0.0"
+ }
+ }
+ },
+ "Grpc.Tools/2.41.0": {},
+ "Microsoft.EntityFrameworkCore/6.0.7": {
+ "dependencies": {
+ "Microsoft.EntityFrameworkCore.Abstractions": "6.0.7",
+ "Microsoft.EntityFrameworkCore.Analyzers": "6.0.7",
+ "Microsoft.Extensions.Caching.Memory": "6.0.1",
+ "Microsoft.Extensions.DependencyInjection": "6.0.0",
+ "Microsoft.Extensions.Logging": "6.0.0",
+ "System.Collections.Immutable": "6.0.0",
+ "System.Diagnostics.DiagnosticSource": "6.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.EntityFrameworkCore.dll": {
+ "assemblyVersion": "6.0.7.0",
+ "fileVersion": "6.0.722.31501"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore.Abstractions/6.0.7": {
+ "runtime": {
+ "lib/net6.0/Microsoft.EntityFrameworkCore.Abstractions.dll": {
+ "assemblyVersion": "6.0.7.0",
+ "fileVersion": "6.0.722.31501"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore.Analyzers/6.0.7": {},
+ "Microsoft.EntityFrameworkCore.Relational/6.0.7": {
+ "dependencies": {
+ "Microsoft.EntityFrameworkCore": "6.0.7",
+ "Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.EntityFrameworkCore.Relational.dll": {
+ "assemblyVersion": "6.0.7.0",
+ "fileVersion": "6.0.722.31501"
+ }
+ }
+ },
+ "Microsoft.Extensions.ApiDescription.Server/3.0.0": {},
+ "Microsoft.Extensions.Caching.Abstractions/6.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "6.0.0"
+ }
+ },
+ "Microsoft.Extensions.Caching.Memory/6.0.1": {
+ "dependencies": {
+ "Microsoft.Extensions.Caching.Abstractions": "6.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "6.0.0",
+ "Microsoft.Extensions.Options": "6.0.0",
+ "Microsoft.Extensions.Primitives": "6.0.0"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.Extensions.Caching.Memory.dll": {
+ "assemblyVersion": "6.0.0.0",
+ "fileVersion": "6.0.222.6406"
+ }
+ }
+ },
+ "Microsoft.Extensions.Configuration.Abstractions/6.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "6.0.0"
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection/6.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/6.0.0": {},
+ "Microsoft.Extensions.Http/3.0.3": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
+ "Microsoft.Extensions.Logging": "6.0.0",
+ "Microsoft.Extensions.Options": "6.0.0"
+ }
+ },
+ "Microsoft.Extensions.Logging/6.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection": "6.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "6.0.0",
+ "Microsoft.Extensions.Options": "6.0.0",
+ "System.Diagnostics.DiagnosticSource": "6.0.0"
+ }
+ },
+ "Microsoft.Extensions.Logging.Abstractions/6.0.0": {},
+ "Microsoft.Extensions.Options/6.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
+ "Microsoft.Extensions.Primitives": "6.0.0"
+ }
+ },
+ "Microsoft.Extensions.Primitives/6.0.0": {
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ }
+ },
+ "Microsoft.OpenApi/1.2.3": {
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.OpenApi.dll": {
+ "assemblyVersion": "1.2.3.0",
+ "fileVersion": "1.2.3.0"
+ }
+ }
+ },
+ "MySqlConnector/2.1.2": {
+ "runtime": {
+ "lib/net6.0/MySqlConnector.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.1.2.0"
+ }
+ }
+ },
+ "Pomelo.EntityFrameworkCore.MySql/6.0.2": {
+ "dependencies": {
+ "Microsoft.EntityFrameworkCore.Relational": "6.0.7",
+ "Microsoft.Extensions.DependencyInjection": "6.0.0",
+ "MySqlConnector": "2.1.2"
+ },
+ "runtime": {
+ "lib/net6.0/Pomelo.EntityFrameworkCore.MySql.dll": {
+ "assemblyVersion": "6.0.2.0",
+ "fileVersion": "6.0.2.0"
+ }
+ }
+ },
+ "Swashbuckle.AspNetCore/5.6.3": {
+ "dependencies": {
+ "Microsoft.Extensions.ApiDescription.Server": "3.0.0",
+ "Swashbuckle.AspNetCore.Swagger": "6.2.3",
+ "Swashbuckle.AspNetCore.SwaggerGen": "5.6.3",
+ "Swashbuckle.AspNetCore.SwaggerUI": "5.6.3"
+ }
+ },
+ "Swashbuckle.AspNetCore.Swagger/6.2.3": {
+ "dependencies": {
+ "Microsoft.OpenApi": "1.2.3"
+ },
+ "runtime": {
+ "lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": {
+ "assemblyVersion": "6.2.3.0",
+ "fileVersion": "6.2.3.0"
+ }
+ }
+ },
+ "Swashbuckle.AspNetCore.SwaggerGen/5.6.3": {
+ "dependencies": {
+ "Swashbuckle.AspNetCore.Swagger": "6.2.3"
+ },
+ "runtime": {
+ "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
+ "assemblyVersion": "5.6.3.0",
+ "fileVersion": "5.6.3.0"
+ }
+ }
+ },
+ "Swashbuckle.AspNetCore.SwaggerUI/5.6.3": {
+ "runtime": {
+ "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
+ "assemblyVersion": "5.6.3.0",
+ "fileVersion": "5.6.3.0"
+ }
+ }
+ },
+ "System.Collections.Immutable/6.0.0": {
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/6.0.0": {
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ }
+ },
+ "System.Memory/4.5.3": {},
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {},
+ "BlueWest/1.0.0": {
+ "runtime": {
+ "BlueWest.dll": {}
+ }
+ },
+ "BlueWest.Data/1.0.0": {
+ "dependencies": {
+ "Math-Expression-Evaluator": "1.3.2"
+ },
+ "runtime": {
+ "BlueWest.Data.dll": {}
+ }
+ },
+ "Math-Expression-Evaluator/1.3.2": {
+ "runtime": {
+ "SimpleExpressionEvaluator.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "BlueWest.Api/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Google.Protobuf/3.18.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Jm6+nppUm9LD+XVsLFkf1YyVlAKsG5gq+Hc/Rn3Zi2pDObBI6PCH/eHBFUJdARl40DpczEdHlV3+WTPOGIXetg==",
+ "path": "google.protobuf/3.18.0",
+ "hashPath": "google.protobuf.3.18.0.nupkg.sha512"
+ },
+ "Grpc.AspNetCore/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JMwlIpaI6QnuO/LaHu40Oiq1ssIJTi4Q9z+MsKDeL8rqp9HFBzhepYnoWxXZZiahgLaC2kVDlcxbYuzucImBgQ==",
+ "path": "grpc.aspnetcore/2.41.0",
+ "hashPath": "grpc.aspnetcore.2.41.0.nupkg.sha512"
+ },
+ "Grpc.AspNetCore.Server/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Snbmre+4zd7w5SKmaAq49G6l3eXpKwn6d//ph2klloVEradOvvMd1q2bYybG4Ryr6YU6bN2zJRpUQjKZy1JZug==",
+ "path": "grpc.aspnetcore.server/2.41.0",
+ "hashPath": "grpc.aspnetcore.server.2.41.0.nupkg.sha512"
+ },
+ "Grpc.AspNetCore.Server.ClientFactory/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-no6+pmtH4PEqRyomEG0eQlPaO4hEY5bBDvEWfn6bVz1eRlE22L2+/XZay7AzIkrILsnm+GZIngEdnK8onfrJkQ==",
+ "path": "grpc.aspnetcore.server.clientfactory/2.41.0",
+ "hashPath": "grpc.aspnetcore.server.clientfactory.2.41.0.nupkg.sha512"
+ },
+ "Grpc.AspNetCore.Web/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DdHsgKThh7Df7awF7j5QN3dmn0Ao/PG3A6IXqP/edmkEhGeYiMcWafwzxRLT0St2JJtFiGdvWHGWmQMpXU4mBA==",
+ "path": "grpc.aspnetcore.web/2.41.0",
+ "hashPath": "grpc.aspnetcore.web.2.41.0.nupkg.sha512"
+ },
+ "Grpc.Core.Api/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bQ/mLaeACJ16hINQzKZA0ge648acF0OUiHd8JMdvpywJ41UFilDOd+t3yDG0M2XxgbB98z8EUf0HnprHLOO0qg==",
+ "path": "grpc.core.api/2.41.0",
+ "hashPath": "grpc.core.api.2.41.0.nupkg.sha512"
+ },
+ "Grpc.Net.Client/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-hKuRI7eHxIdrBtricxXuNu+vzjErt7n+zcIr47M56pnajKnzFlG4zwLiPCuxKC22cZTI5S6ef50jCrI/vQrL2w==",
+ "path": "grpc.net.client/2.41.0",
+ "hashPath": "grpc.net.client.2.41.0.nupkg.sha512"
+ },
+ "Grpc.Net.ClientFactory/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-8uUxz9Sbpz7dudq3i2hBfmaRbLHImFcGx1Kn9CtpGtBok3WXL7FepUj0SIU4Iv95VQNYbefi41mIGxFylAO6Mg==",
+ "path": "grpc.net.clientfactory/2.41.0",
+ "hashPath": "grpc.net.clientfactory.2.41.0.nupkg.sha512"
+ },
+ "Grpc.Net.Common/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Mcb6ybFRZYEqn1UVpfCADL2HSTJSK9+V2BBLyS6vebMNkmGwqa0KQ3x++kC+n28MAP4BlrR+jxW0XGNP6V9amw==",
+ "path": "grpc.net.common/2.41.0",
+ "hashPath": "grpc.net.common.2.41.0.nupkg.sha512"
+ },
+ "Grpc.Tools/2.41.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-u5jiyjo/ZX9O3WlrxEcM5yrnA45G+CM3ukMhDGZnaeXChqCNJEZDpayBiEAdeD4FZ/pAaGDr4rn1SpaHxLtPrw==",
+ "path": "grpc.tools/2.41.0",
+ "hashPath": "grpc.tools.2.41.0.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore/6.0.7": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-9BsvGSpTzxvqnxH19wLBFivK5TzWmsHZQc/1cQ4b2e+k85aIG9R4FYewQLHZdPrAxNQImXjTyW5nRI3s1rpt6A==",
+ "path": "microsoft.entityframeworkcore/6.0.7",
+ "hashPath": "microsoft.entityframeworkcore.6.0.7.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Abstractions/6.0.7": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bjU0CkTqldgpVPTSj9M+R/3EaTz+u0jMeQMIC91YdGYDbpX/tAN5UYx+Ihzk4AtP8gmhburQUgMTdnmCE9c5sA==",
+ "path": "microsoft.entityframeworkcore.abstractions/6.0.7",
+ "hashPath": "microsoft.entityframeworkcore.abstractions.6.0.7.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Analyzers/6.0.7": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-VAOrGma8mRspUb/9quwIr21UZVqfWOcRQqhcYNkHBUD7woenwFTBvntiC9h2Ebtvj/BrRfezqjaHpWVvPSg4dw==",
+ "path": "microsoft.entityframeworkcore.analyzers/6.0.7",
+ "hashPath": "microsoft.entityframeworkcore.analyzers.6.0.7.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Relational/6.0.7": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0uo4fPDHutMbd9AJJEKl2q/2fYuFGA8tEBE2fQeQFaNDd+F/aUjaXc1FUD84J7Wcax8WP40rZo1E0u9A0yPPZw==",
+ "path": "microsoft.entityframeworkcore.relational/6.0.7",
+ "hashPath": "microsoft.entityframeworkcore.relational.6.0.7.nupkg.sha512"
+ },
+ "Microsoft.Extensions.ApiDescription.Server/3.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w==",
+ "path": "microsoft.extensions.apidescription.server/3.0.0",
+ "hashPath": "microsoft.extensions.apidescription.server.3.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Caching.Abstractions/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bcz5sSFJbganH0+YrfvIjJDIcKNW7TL07C4d1eTmXy/wOt52iz4LVogJb6pazs7W0+74j0YpXFErvp++Aq5Bsw==",
+ "path": "microsoft.extensions.caching.abstractions/6.0.0",
+ "hashPath": "microsoft.extensions.caching.abstractions.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Caching.Memory/6.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-B4y+Cev05eMcjf1na0v9gza6GUtahXbtY1JCypIgx3B4Ea/KAgsWyXEmW4q6zMbmTMtKzmPVk09rvFJirvMwTg==",
+ "path": "microsoft.extensions.caching.memory/6.0.1",
+ "hashPath": "microsoft.extensions.caching.memory.6.0.1.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Configuration.Abstractions/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-qWzV9o+ZRWq+pGm+1dF+R7qTgTYoXvbyowRoBxQJGfqTpqDun2eteerjRQhq5PQ/14S+lqto3Ft4gYaRyl4rdQ==",
+ "path": "microsoft.extensions.configuration.abstractions/6.0.0",
+ "hashPath": "microsoft.extensions.configuration.abstractions.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.DependencyInjection/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==",
+ "path": "microsoft.extensions.dependencyinjection/6.0.0",
+ "hashPath": "microsoft.extensions.dependencyinjection.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==",
+ "path": "microsoft.extensions.dependencyinjection.abstractions/6.0.0",
+ "hashPath": "microsoft.extensions.dependencyinjection.abstractions.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Http/3.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-dcyB8szIcSynjVZRuFgqkZpPgTc5zeRSj1HMXSmNqWbHYKiPYJl8ZQgBHz6wmZNSUUNGpCs5uxUg8DZHHDC1Ew==",
+ "path": "microsoft.extensions.http/3.0.3",
+ "hashPath": "microsoft.extensions.http.3.0.3.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Logging/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==",
+ "path": "microsoft.extensions.logging/6.0.0",
+ "hashPath": "microsoft.extensions.logging.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Logging.Abstractions/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==",
+ "path": "microsoft.extensions.logging.abstractions/6.0.0",
+ "hashPath": "microsoft.extensions.logging.abstractions.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Options/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==",
+ "path": "microsoft.extensions.options/6.0.0",
+ "hashPath": "microsoft.extensions.options.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Primitives/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==",
+ "path": "microsoft.extensions.primitives/6.0.0",
+ "hashPath": "microsoft.extensions.primitives.6.0.0.nupkg.sha512"
+ },
+ "Microsoft.OpenApi/1.2.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Nug3rO+7Kl5/SBAadzSMAVgqDlfGjJZ0GenQrLywJ84XGKO0uRqkunz5Wyl0SDwcR71bAATXvSdbdzPrYRYKGw==",
+ "path": "microsoft.openapi/1.2.3",
+ "hashPath": "microsoft.openapi.1.2.3.nupkg.sha512"
+ },
+ "MySqlConnector/2.1.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JVokQTUNN3WHAu9Vw8ieeq1dXTFokJiig5P0VJ4f439UxRrsPo6SaVWC8Zdm6mkPeQFhZ0/9afdWa02EY/1j/w==",
+ "path": "mysqlconnector/2.1.2",
+ "hashPath": "mysqlconnector.2.1.2.nupkg.sha512"
+ },
+ "Pomelo.EntityFrameworkCore.MySql/6.0.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KvlZ800CnEuEGnxj5OT1fCKGjQXxW5kpPlCP91JqBYG+2Z3927eqXmlX6LLKUt4swqE8ZsEQ+Zkpab8bqstf4g==",
+ "path": "pomelo.entityframeworkcore.mysql/6.0.2",
+ "hashPath": "pomelo.entityframeworkcore.mysql.6.0.2.nupkg.sha512"
+ },
+ "Swashbuckle.AspNetCore/5.6.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-UkL9GU0mfaA+7RwYjEaBFvAzL8qNQhNqAeV5uaWUu/Z+fVgvK9FHkGCpTXBqSQeIHuZaIElzxnLDdIqGzuCnVg==",
+ "path": "swashbuckle.aspnetcore/5.6.3",
+ "hashPath": "swashbuckle.aspnetcore.5.6.3.nupkg.sha512"
+ },
+ "Swashbuckle.AspNetCore.Swagger/6.2.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-qOF7j1sL0bWm8g/qqHVPCvkO3JlVvUIB8WfC98kSh6BT5y5DAnBNctfac7XR5EZf+eD7/WasvANncTqwZYfmWQ==",
+ "path": "swashbuckle.aspnetcore.swagger/6.2.3",
+ "hashPath": "swashbuckle.aspnetcore.swagger.6.2.3.nupkg.sha512"
+ },
+ "Swashbuckle.AspNetCore.SwaggerGen/5.6.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CkhVeod/iLd3ikVTDOwG5sym8BE5xbqGJ15iF3cC7ZPg2kEwDQL4a88xjkzsvC9oOB2ax6B0rK0EgRK+eOBX+w==",
+ "path": "swashbuckle.aspnetcore.swaggergen/5.6.3",
+ "hashPath": "swashbuckle.aspnetcore.swaggergen.5.6.3.nupkg.sha512"
+ },
+ "Swashbuckle.AspNetCore.SwaggerUI/5.6.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BPvcPxQRMsYZ3HnYmGKRWDwX4Wo29WHh14Q6B10BB8Yfbbcza+agOC2UrBFA1EuaZuOsFLbp6E2+mqVNF/Je8A==",
+ "path": "swashbuckle.aspnetcore.swaggerui/5.6.3",
+ "hashPath": "swashbuckle.aspnetcore.swaggerui.5.6.3.nupkg.sha512"
+ },
+ "System.Collections.Immutable/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
+ "path": "system.collections.immutable/6.0.0",
+ "hashPath": "system.collections.immutable.6.0.0.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==",
+ "path": "system.diagnostics.diagnosticsource/6.0.0",
+ "hashPath": "system.diagnostics.diagnosticsource.6.0.0.nupkg.sha512"
+ },
+ "System.Memory/4.5.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
+ "path": "system.memory/4.5.3",
+ "hashPath": "system.memory.4.5.3.nupkg.sha512"
+ },
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
+ "path": "system.runtime.compilerservices.unsafe/6.0.0",
+ "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
+ },
+ "BlueWest/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "BlueWest.Data/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Math-Expression-Evaluator/1.3.2": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/BlueWest.Api/xoxo/babe/BlueWest.Api.dll b/BlueWest.Api/xoxo/babe/BlueWest.Api.dll
new file mode 100644
index 0000000..b37e496
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/BlueWest.Api.dll differ
diff --git a/BlueWest.Api/xoxo/babe/BlueWest.Data.dll b/BlueWest.Api/xoxo/babe/BlueWest.Data.dll
new file mode 100644
index 0000000..997b399
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/BlueWest.Data.dll differ
diff --git a/BlueWest.Api/xoxo/babe/BlueWest.dll b/BlueWest.Api/xoxo/babe/BlueWest.dll
new file mode 100644
index 0000000..b7d443a
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/BlueWest.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Google.Protobuf.dll b/BlueWest.Api/xoxo/babe/Google.Protobuf.dll
new file mode 100644
index 0000000..1a2c191
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Google.Protobuf.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Server.ClientFactory.dll b/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Server.ClientFactory.dll
new file mode 100644
index 0000000..c5879ac
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Server.ClientFactory.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Server.dll b/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Server.dll
new file mode 100644
index 0000000..6c46d99
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Server.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Web.dll b/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Web.dll
new file mode 100644
index 0000000..a929717
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Grpc.AspNetCore.Web.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Grpc.Core.Api.dll b/BlueWest.Api/xoxo/babe/Grpc.Core.Api.dll
new file mode 100644
index 0000000..5920831
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Grpc.Core.Api.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Grpc.Net.Client.dll b/BlueWest.Api/xoxo/babe/Grpc.Net.Client.dll
new file mode 100644
index 0000000..599945b
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Grpc.Net.Client.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Grpc.Net.ClientFactory.dll b/BlueWest.Api/xoxo/babe/Grpc.Net.ClientFactory.dll
new file mode 100644
index 0000000..6a61a1b
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Grpc.Net.ClientFactory.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Grpc.Net.Common.dll b/BlueWest.Api/xoxo/babe/Grpc.Net.Common.dll
new file mode 100644
index 0000000..52a1bbf
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Grpc.Net.Common.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.Abstractions.dll b/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.Abstractions.dll
new file mode 100644
index 0000000..2850378
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.Abstractions.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.Relational.dll b/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.Relational.dll
new file mode 100644
index 0000000..e66a6a4
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.Relational.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.dll b/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.dll
new file mode 100644
index 0000000..032e6e0
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Microsoft.EntityFrameworkCore.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Microsoft.Extensions.Caching.Memory.dll b/BlueWest.Api/xoxo/babe/Microsoft.Extensions.Caching.Memory.dll
new file mode 100644
index 0000000..42eb85f
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Microsoft.Extensions.Caching.Memory.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Microsoft.OpenApi.dll b/BlueWest.Api/xoxo/babe/Microsoft.OpenApi.dll
new file mode 100644
index 0000000..14f3ded
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Microsoft.OpenApi.dll differ
diff --git a/BlueWest.Api/xoxo/babe/MySqlConnector.dll b/BlueWest.Api/xoxo/babe/MySqlConnector.dll
new file mode 100644
index 0000000..3247a94
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/MySqlConnector.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Pomelo.EntityFrameworkCore.MySql.dll b/BlueWest.Api/xoxo/babe/Pomelo.EntityFrameworkCore.MySql.dll
new file mode 100644
index 0000000..97221ed
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Pomelo.EntityFrameworkCore.MySql.dll differ
diff --git a/BlueWest.Api/xoxo/babe/SimpleExpressionEvaluator.dll b/BlueWest.Api/xoxo/babe/SimpleExpressionEvaluator.dll
new file mode 100644
index 0000000..01180cb
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/SimpleExpressionEvaluator.dll differ
diff --git a/BlueWest.Api/xoxo/babe/SimpleExpressionEvaluator.xml b/BlueWest.Api/xoxo/babe/SimpleExpressionEvaluator.xml
new file mode 100644
index 0000000..52b3cf1
--- /dev/null
+++ b/BlueWest.Api/xoxo/babe/SimpleExpressionEvaluator.xml
@@ -0,0 +1,36 @@
+
+
+
+ SimpleExpressionEvaluator
+
+
+
+
+ Class for compiling and evaluating simple mathematical expressions
+
+
+
+
+ Gets the current culture used by when parsing strings into numbers
+
+
+
+
+ Initializes new instance of using
+
+
+
+
+ Initializes new instance of using specified culture info
+
+ Culture to use for parsing decimal numbers
+
+
+
+ Compiles parameterized mathematical expression into a delegate which can be invoked with different arguments without having to parse the expression again.
+
+ Expression to parse and compile
+ Delegate compiled from the expression
+
+
+
diff --git a/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.Swagger.dll b/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.Swagger.dll
new file mode 100644
index 0000000..a30e6cc
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.Swagger.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.SwaggerGen.dll b/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.SwaggerGen.dll
new file mode 100644
index 0000000..c73a8c5
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.SwaggerGen.dll differ
diff --git a/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.SwaggerUI.dll b/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.SwaggerUI.dll
new file mode 100644
index 0000000..67d7f86
Binary files /dev/null and b/BlueWest.Api/xoxo/babe/Swashbuckle.AspNetCore.SwaggerUI.dll differ
diff --git a/BlueWest.Api/xoxo/babe/appsettings.Development.json b/BlueWest.Api/xoxo/babe/appsettings.Development.json
new file mode 100644
index 0000000..8983e0f
--- /dev/null
+++ b/BlueWest.Api/xoxo/babe/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ }
+}
diff --git a/BlueWest.Api/xoxo/babe/appsettings.json b/BlueWest.Api/xoxo/babe/appsettings.json
new file mode 100644
index 0000000..cadbc89
--- /dev/null
+++ b/BlueWest.Api/xoxo/babe/appsettings.json
@@ -0,0 +1,13 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*",
+ "ConnectionStrings": {
+ "LocalMySQL": "server=127.0.0.1;user=blueuser;password=JwuWxhWxhh$X1;database=bluedb;"
+ }
+}
diff --git a/BlueWest.Api/xoxo/babe/web.config b/BlueWest.Api/xoxo/babe/web.config
new file mode 100644
index 0000000..ef72228
--- /dev/null
+++ b/BlueWest.Api/xoxo/babe/web.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BlueWest.Collections/BlueWest.Collections.csproj b/BlueWest.Collections/BlueWest.Collections.csproj
deleted file mode 100644
index 2b9e8e2..0000000
--- a/BlueWest.Collections/BlueWest.Collections.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- netstandard2.0
- disable
-
-
-
-
-
-
-
diff --git a/BlueWest.Collections/FastDictionary.cs b/BlueWest.Collections/FastDictionary.cs
deleted file mode 100644
index 5e25cba..0000000
--- a/BlueWest.Collections/FastDictionary.cs
+++ /dev/null
@@ -1,943 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics.Contracts;
-using System.Runtime.CompilerServices;
-
-namespace BlueWest.Collections
-{
- internal static class DictionaryHelper
- {
- ///
- /// Minimum size we're willing to let hashtables be.
- /// Must be a power of two, and at least 4.
- /// Note, however, that for a given hashtable, the initial size is a function of the first constructor arg, and may be > kMinBuckets.
- ///
- internal const int kMinBuckets = 4;
-
- ///
- /// By default, if you don't specify a hashtable size at construction-time, we use this size. Must be a power of two, and at least kMinBuckets.
- ///
- internal const int kInitialCapacity = 32;
-
- internal const int kPowerOfTableSize = 2048;
-
- private readonly static int[] nextPowerOf2Table = new int[kPowerOfTableSize];
-
- static DictionaryHelper()
- {
- for (int i = 0; i <= kMinBuckets; i++)
- nextPowerOf2Table[i] = kMinBuckets;
-
- for (int i = kMinBuckets + 1; i < kPowerOfTableSize; i++)
- nextPowerOf2Table[i] = NextPowerOf2Internal(i);
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal static int NextPowerOf2(int v)
- {
- if (v < kPowerOfTableSize)
- {
- return nextPowerOf2Table[v];
- }
- else
- {
- return NextPowerOf2Internal(v);
- }
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static int NextPowerOf2Internal(int v)
- {
- v--;
- v |= v >> 1;
- v |= v >> 2;
- v |= v >> 4;
- v |= v >> 8;
- v |= v >> 16;
- v++;
-
- return v;
- }
- }
-
- public class FastDictionary : IEnumerable>
- {
- const int InvalidNodePosition = -1;
-
- public const uint kUnusedHash = 0xFFFFFFFF;
- public const uint kDeletedHash = 0xFFFFFFFE;
-
- // TLoadFactor4 - controls hash map load. 4 means 100% load, ie. hashmap will grow
- // when number of items == capacity. Default value of 6 means it grows when
- // number of items == capacity * 3/2 (6/4). Higher load == tighter maps, but bigger
- // risk of collisions.
- static int tLoadFactor = 6;
-
- private struct Entry
- {
- public uint Hash;
- public TKey Key;
- public TValue Value;
-
- public Entry ( uint hash, TKey key, TValue value)
- {
- this.Hash = hash;
- this.Key = key;
- this.Value = value;
- }
- }
-
- private Entry[] _entries;
-
- private int _capacity;
-
- private int _initialCapacity; // This is the initial capacity of the dictionary, we will never shrink beyond this point.
- private int _size; // This is the real counter of how many items are in the hash-table (regardless of buckets)
- private int _numberOfUsed; // How many used buckets.
- private int _numberOfDeleted; // how many occupied buckets are marked deleted
- private int _nextGrowthThreshold;
-
-
- private readonly IEqualityComparer comparer;
- public IEqualityComparer Comparer
- {
- get { return comparer; }
- }
-
- public int Capacity
- {
- get { return _capacity; }
- }
-
- public int Count
- {
- get { return _size; }
- }
-
- public bool IsEmpty
- {
- get { return Count == 0; }
- }
-
- public FastDictionary(int initialBucketCount, IEnumerable> src, IEqualityComparer comparer)
- : this(initialBucketCount, comparer)
- {
- Contract.Requires(src != null);
- Contract.Ensures(_capacity >= initialBucketCount);
-
- foreach (var item in src)
- this[item.Key] = item.Value;
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public FastDictionary(FastDictionary src, IEqualityComparer comparer)
- : this(src._capacity, src, comparer)
- { }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public FastDictionary(FastDictionary src)
- : this(src._capacity, src, src.comparer)
- { }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public FastDictionary(int initialBucketCount, FastDictionary src, IEqualityComparer comparer)
- {
- Contract.Requires(src != null);
- Contract.Ensures(_capacity >= initialBucketCount);
- Contract.Ensures(_capacity >= src._capacity);
-
- this.comparer = comparer ?? EqualityComparer.Default;
-
- this._initialCapacity = DictionaryHelper.NextPowerOf2(initialBucketCount);
- this._capacity = Math.Max(src._capacity, initialBucketCount);
- this._size = src._size;
- this._numberOfUsed = src._numberOfUsed;
- this._numberOfDeleted = src._numberOfDeleted;
- this._nextGrowthThreshold = src._nextGrowthThreshold;
-
- int newCapacity = _capacity;
-
- if (comparer == src.comparer)
- {
- // Initialization through copy (very efficient) because the comparer is the same.
- this._entries = new Entry[newCapacity];
- Array.Copy(src._entries, _entries, newCapacity);
- }
- else
- {
- // Initialization through rehashing because the comparer is not the same.
- var entries = new Entry[newCapacity];
- BlockCopyMemoryHelper.Memset(entries, new Entry(kUnusedHash, default(TKey), default(TValue)));
-
- // Creating a temporary alias to use for rehashing.
- this._entries = src._entries;
-
- // This call will rewrite the aliases
- Rehash(entries);
- }
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public FastDictionary(IEqualityComparer comparer)
- : this(DictionaryHelper.kInitialCapacity, comparer)
- { }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public FastDictionary(int initialBucketCount, IEqualityComparer comparer)
- {
- Contract.Ensures(_capacity >= initialBucketCount);
-
- this.comparer = comparer ?? EqualityComparer.Default;
-
- // Calculate the next power of 2.
- int newCapacity = initialBucketCount >= DictionaryHelper.kMinBuckets ? initialBucketCount : DictionaryHelper.kMinBuckets;
- newCapacity = DictionaryHelper.NextPowerOf2(newCapacity);
-
- this._initialCapacity = newCapacity;
-
- // Initialization
- this._entries = new Entry[newCapacity];
- BlockCopyMemoryHelper.Memset(this._entries, new Entry(kUnusedHash, default(TKey), default(TValue)));
-
- this._capacity = newCapacity;
-
- this._numberOfUsed = 0;
- this._numberOfDeleted = 0;
- this._size = 0;
-
- this._nextGrowthThreshold = _capacity * 4 / tLoadFactor;
- }
-
- public FastDictionary(int initialBucketCount = DictionaryHelper.kInitialCapacity)
- : this(initialBucketCount, EqualityComparer.Default)
- { }
-
- public void Add(TKey key, TValue value)
- {
- Contract.Ensures(this._numberOfUsed <= this._capacity);
- Contract.EndContractBlock();
-
- if (key == null)
- throw new ArgumentNullException("key");
-
- ResizeIfNeeded();
-
- int hash = GetInternalHashCode(key);
- int bucket = hash % _capacity;
-
- uint uhash = (uint)hash;
- int numProbes = 1;
- do
- {
- uint nHash = _entries[bucket].Hash;
- if (nHash == kUnusedHash)
- {
- _numberOfUsed++;
- _size++;
-
- goto SET;
- }
-
- if (nHash == uhash && comparer.Equals(_entries[bucket].Key, key))
- throw new ArgumentException("Cannot add duplicated key.", "key");
-
- bucket = (bucket + numProbes) % _capacity;
- numProbes++;
- }
- while (true);
-
- SET:
- this._entries[bucket].Hash = uhash;
- this._entries[bucket].Key = key;
- this._entries[bucket].Value = value;
- }
-
- public bool Remove(TKey key)
- {
- Contract.Ensures(this._numberOfUsed < this._capacity);
-
- if (key == null)
- throw new ArgumentNullException("key");
-
- int bucket = Lookup(key);
- if (bucket == InvalidNodePosition)
- return false;
-
- SetDeleted(bucket);
-
- return true;
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void SetDeleted(int node)
- {
- Contract.Ensures(_size <= Contract.OldValue(_size));
-
- if (_entries[node].Hash < kDeletedHash)
- {
- _entries[node].Hash = kDeletedHash;
- _entries[node].Key = default(TKey);
- _entries[node].Value = default(TValue);
-
- _numberOfDeleted++;
- _size--;
- }
-
- Contract.Assert(_numberOfDeleted >= Contract.OldValue(_numberOfDeleted));
- Contract.Assert(_entries[node].Hash == kDeletedHash);
-
- if (3 * this._numberOfDeleted / 2 > this._capacity - this._numberOfUsed)
- {
- // We will force a rehash with the growth factor based on the current size.
- Shrink(Math.Max(_initialCapacity, _size * 2));
- }
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ResizeIfNeeded()
- {
- if (_size >= _nextGrowthThreshold)
- {
- Grow(_capacity * 2);
- }
- }
-
- private void Shrink(int newCapacity)
- {
- Contract.Requires(newCapacity > _size);
- Contract.Ensures(this._numberOfUsed < this._capacity);
-
- // Calculate the next power of 2.
- newCapacity = Math.Max(DictionaryHelper.NextPowerOf2(newCapacity), _initialCapacity);
-
- var entries = new Entry[newCapacity];
- BlockCopyMemoryHelper.Memset(entries, new Entry(kUnusedHash, default(TKey), default(TValue)));
-
- Rehash(entries);
- }
-
-
- public TValue this[TKey key]
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- Contract.Requires(key != null);
- Contract.Ensures(this._numberOfUsed <= this._capacity);
-
- int hash = GetInternalHashCode(key);
- int bucket = hash % _capacity;
-
- var entries = _entries;
-
- uint nHash;
- int numProbes = 1;
- do
- {
- nHash = entries[bucket].Hash;
- if (nHash == hash && comparer.Equals(entries[bucket].Key, key))
- return entries[bucket].Value;
-
- bucket = (bucket + numProbes) % _capacity;
- numProbes++;
-
- }
- while (nHash != kUnusedHash);
-
- throw new KeyNotFoundException();
- }
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- set
- {
- Contract.Requires(key != null);
- Contract.Ensures(this._numberOfUsed <= this._capacity);
-
- ResizeIfNeeded();
-
- int hash = GetInternalHashCode(key);
- int bucket = hash % _capacity;
-
- uint uhash = (uint)hash;
- int numProbes = 1;
- do
- {
- uint nHash = _entries[bucket].Hash;
- if (nHash == kUnusedHash)
- {
- _numberOfUsed++;
- _size++;
-
- goto SET;
- }
-
- if (nHash == uhash && comparer.Equals(_entries[bucket].Key, key))
- goto SET;
-
- bucket = (bucket + numProbes) % _capacity;
- numProbes++;
-
- }
- while (true);
-
- SET:
- this._entries[bucket].Hash = uhash;
- this._entries[bucket].Key = key;
- this._entries[bucket].Value = value;
- }
- }
-
- public void Clear()
- {
- this._entries = new Entry[_capacity];
- BlockCopyMemoryHelper.Memset(this._entries, new Entry(kUnusedHash, default(TKey), default(TValue)));
-
- this._numberOfUsed = 0;
- this._numberOfDeleted = 0;
- this._size = 0;
- }
-
- public bool Contains(TKey key)
- {
- Contract.Ensures(this._numberOfUsed <= this._capacity);
-
- if (key == null)
- throw new ArgumentNullException("key");
-
- return (Lookup(key) != InvalidNodePosition);
- }
-
- private void Grow(int newCapacity)
- {
- Contract.Requires(newCapacity >= _capacity);
- Contract.Ensures((_capacity & (_capacity - 1)) == 0);
-
- var entries = new Entry[newCapacity];
- BlockCopyMemoryHelper.Memset(entries, new Entry(kUnusedHash, default(TKey), default(TValue)));
-
- Rehash(entries);
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public bool TryGetValue(TKey key, out TValue value)
- {
- Contract.Requires(key != null);
- Contract.Ensures(this._numberOfUsed <= this._capacity);
-
- int hash = GetInternalHashCode(key);
- int bucket = hash % _capacity;
-
- var entries = _entries;
-
- uint nHash;
- int numProbes = 1;
- do
- {
- nHash = entries[bucket].Hash;
- if (nHash == hash && comparer.Equals(entries[bucket].Key, key))
- {
- value = entries[bucket].Value;
- return true;
- }
-
- bucket = (bucket + numProbes) % _capacity;
- numProbes++;
-
- }
- while (nHash != kUnusedHash);
-
- value = default(TValue);
- return false;
-
- }
-
- ///
- ///
- ///
- ///
- /// Position of the node in the array
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private int Lookup(TKey key)
- {
- int hash = GetInternalHashCode(key);
- int bucket = hash % _capacity;
-
- var entries = _entries;
-
- uint uhash = (uint)hash;
- uint numProbes = 1; // how many times we've probed
-
- uint nHash;
- do
- {
- nHash = entries[bucket].Hash;
- if (nHash == hash && comparer.Equals(entries[bucket].Key, key))
- return bucket;
-
- bucket = (int)((bucket + numProbes) % _capacity);
- numProbes++;
-
- }
- while (nHash != kUnusedHash);
-
- return InvalidNodePosition;
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private int GetInternalHashCode(TKey key)
- {
- return comparer.GetHashCode(key) & 0x7FFFFFFF;
- }
-
- private void Rehash(Entry[] entries)
- {
- uint capacity = (uint)entries.Length;
-
- var size = 0;
-
- for (int it = 0; it < _entries.Length; it++)
- {
- uint hash = _entries[it].Hash;
- if (hash >= kDeletedHash) // No interest for the process of rehashing, we are skipping it.
- continue;
-
- uint bucket = hash % capacity;
-
- uint numProbes = 0;
- while (!(entries[bucket].Hash == kUnusedHash))
- {
- numProbes++;
- bucket = (bucket + numProbes) % capacity;
- }
-
- entries[bucket].Hash = hash;
- entries[bucket].Key = _entries[it].Key;
- entries[bucket].Value = _entries[it].Value;
-
- size++;
- }
-
- this._capacity = entries.Length;
- this._size = size;
- this._entries = entries;
-
- this._numberOfUsed = size;
- this._numberOfDeleted = 0;
-
- this._nextGrowthThreshold = _capacity * 4 / tLoadFactor;
- }
-
-
- public void CopyTo(KeyValuePair[] array, int index)
- {
- if (array == null)
- throw new ArgumentNullException("The array cannot be null", "array");
-
- if (array.Rank != 1)
- throw new ArgumentException("Multiple dimensions array are not supporter", "array");
-
- if (index < 0 || index > array.Length)
- throw new ArgumentOutOfRangeException("index");
-
- if (array.Length - index < Count)
- throw new ArgumentException("The array plus the offset is too small.");
-
- int count = _capacity;
-
- var entries = _entries;
-
- for (int i = 0; i < count; i++)
- {
- if (entries[i].Hash < kDeletedHash)
- array[index++] = new KeyValuePair(entries[i].Key, entries[i].Value);
- }
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return new Enumerator(this);
- }
-
- public IEnumerator> GetEnumerator()
- {
- return new Enumerator(this);
- }
-
-
- [Serializable]
- public struct Enumerator : IEnumerator>
- {
- private FastDictionary dictionary;
- private int index;
- private KeyValuePair current;
-
- internal const int DictEntry = 1;
- internal const int KeyValuePair = 2;
-
- internal Enumerator(FastDictionary dictionary)
- {
- this.dictionary = dictionary;
- this.index = 0;
- this.current = new KeyValuePair();
- }
-
- public bool MoveNext()
- {
- var count = dictionary._capacity;
- var entries = dictionary._entries;
-
- // Use unsigned comparison since we set index to dictionary.count+1 when the enumeration ends.
- // dictionary.count+1 could be negative if dictionary.count is Int32.MaxValue
- while (index < count)
- {
- if (entries[index].Hash < kDeletedHash)
- {
- current = new KeyValuePair(entries[index].Key, entries[index].Value);
- index++;
- return true;
- }
- index++;
- }
-
- index = count + 1;
- current = new KeyValuePair();
- return false;
- }
-
- public KeyValuePair Current
- {
- get { return current; }
- }
-
- public void Dispose()
- {
- }
-
- object IEnumerator.Current
- {
- get
- {
- if (index == 0 || (index == dictionary._capacity + 1))
- throw new InvalidOperationException("Can't happen.");
-
- return new KeyValuePair(current.Key, current.Value);
- }
- }
-
- void IEnumerator.Reset()
- {
- index = 0;
- current = new KeyValuePair();
- }
- }
-
- public KeyCollection Keys
- {
- get { return new KeyCollection(this); }
- }
-
- public ValueCollection Values
- {
- get { return new ValueCollection(this); }
- }
-
- public bool ContainsKey(TKey key)
- {
- if (key == null)
- throw new ArgumentNullException("key");
-
- return (Lookup(key) != InvalidNodePosition);
- }
-
- public bool ContainsValue(TValue value)
- {
- var entries = _entries;
- int count = _capacity;
-
- if (value == null)
- {
- for (int i = 0; i < count; i++)
- {
- if (entries[i].Hash < kDeletedHash && entries[i].Value == null)
- return true;
- }
- }
- else
- {
- EqualityComparer c = EqualityComparer.Default;
- for (int i = 0; i < count; i++)
- {
- if (entries[i].Hash < kDeletedHash && c.Equals(entries[i].Value, value))
- return true;
- }
- }
- return false;
- }
-
-
- public sealed class KeyCollection : IEnumerable, IEnumerable
- {
- private FastDictionary dictionary;
-
- public KeyCollection(FastDictionary dictionary)
- {
- Contract.Requires(dictionary != null);
-
- this.dictionary = dictionary;
- }
-
- public Enumerator GetEnumerator()
- {
- return new Enumerator(dictionary);
- }
-
- public void CopyTo(TKey[] array, int index)
- {
- if (array == null)
- throw new ArgumentNullException("The array cannot be null", "array");
-
- if (index < 0 || index > array.Length)
- throw new ArgumentOutOfRangeException("index");
-
- if (array.Length - index < dictionary.Count)
- throw new ArgumentException("The array plus the offset is too small.");
-
- int count = dictionary._capacity;
- var entries = dictionary._entries;
-
- for (int i = 0; i < count; i++)
- {
- if (entries[i].Hash < kDeletedHash)
- array[index++] = entries[i].Key;
- }
- }
-
- public int Count
- {
- get { return dictionary.Count; }
- }
-
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return new Enumerator(dictionary);
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return new Enumerator(dictionary);
- }
-
-
- [Serializable]
- public struct Enumerator : IEnumerator, IEnumerator
- {
- private FastDictionary dictionary;
- private int index;
- private TKey currentKey;
-
- internal Enumerator(FastDictionary dictionary)
- {
- this.dictionary = dictionary;
- index = 0;
- currentKey = default(TKey);
- }
-
- public void Dispose()
- {
- }
-
- public bool MoveNext()
- {
- var count = dictionary._capacity;
-
- var entries = dictionary._entries;
- while (index < count)
- {
- if (entries[index].Hash < kDeletedHash)
- {
- currentKey = entries[index].Key;
- index++;
- return true;
- }
- index++;
- }
-
- index = count + 1;
- currentKey = default(TKey);
- return false;
- }
-
- public TKey Current
- {
- get
- {
- return currentKey;
- }
- }
-
- Object System.Collections.IEnumerator.Current
- {
- get
- {
- if (index == 0 || (index == dictionary.Count + 1))
- throw new InvalidOperationException("Cant happen.");
-
- return currentKey;
- }
- }
-
- void System.Collections.IEnumerator.Reset()
- {
- index = 0;
- currentKey = default(TKey);
- }
- }
- }
-
-
-
- public sealed class ValueCollection : IEnumerable, IEnumerable
- {
- private FastDictionary dictionary;
-
- public ValueCollection(FastDictionary dictionary)
- {
- Contract.Requires(dictionary != null);
-
- this.dictionary = dictionary;
- }
-
- public Enumerator GetEnumerator()
- {
- return new Enumerator(dictionary);
- }
-
- public void CopyTo(TValue[] array, int index)
- {
- if (array == null)
- throw new ArgumentNullException("The array cannot be null", "array");
-
- if (index < 0 || index > array.Length)
- throw new ArgumentOutOfRangeException("index");
-
- if (array.Length - index < dictionary.Count)
- throw new ArgumentException("The array plus the offset is too small.");
-
- int count = dictionary._capacity;
-
- var entries = dictionary._entries;
- for (int i = 0; i < count; i++)
- {
- if (entries[i].Hash < kDeletedHash)
- array[index++] = entries[i].Value;
- }
- }
-
- public int Count
- {
- get { return dictionary.Count; }
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return new Enumerator(dictionary);
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return new Enumerator(dictionary);
- }
-
-
- [Serializable]
- public struct Enumerator : IEnumerator, IEnumerator
- {
- private FastDictionary dictionary;
- private int index;
- private TValue currentValue;
-
- internal Enumerator(FastDictionary dictionary)
- {
- this.dictionary = dictionary;
- index = 0;
- currentValue = default(TValue);
- }
-
- public void Dispose()
- {
- }
-
- public bool MoveNext()
- {
- var count = dictionary._capacity;
-
- var entries = dictionary._entries;
- while (index < count)
- {
- if (entries[index].Hash < kDeletedHash)
- {
- currentValue = entries[index].Value;
- index++;
- return true;
- }
- index++;
- }
-
- index = count + 1;
- currentValue = default(TValue);
- return false;
- }
-
- public TValue Current
- {
- get
- {
- return currentValue;
- }
- }
- Object IEnumerator.Current
- {
- get
- {
- if (index == 0 || (index == dictionary.Count + 1))
- throw new InvalidOperationException("Cant happen.");
-
- return currentValue;
- }
- }
-
- void IEnumerator.Reset()
- {
- index = 0;
- currentValue = default(TValue);
- }
- }
- }
-
- private class BlockCopyMemoryHelper
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void Memset(Entry[] array, Entry value)
- {
- int block = 64, index = 0;
- int length = Math.Min(block, array.Length);
-
- //Fill the initial array
- while (index < length)
- {
- array[index++] = value;
- }
-
- length = array.Length;
- while (index < length)
- {
- Array.Copy(array, 0, array, index, Math.Min(block, (length - index)));
- index += block;
-
- block *= 2;
- }
- }
- }
- }
-}
diff --git a/BlueWest.Collections/FastList.cs b/BlueWest.Collections/FastList.cs
deleted file mode 100644
index e383676..0000000
--- a/BlueWest.Collections/FastList.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Immutable;
-
-namespace BlueWest.Collections
-{
- ///
- /// very basic wrapper around an array that auto-expands it when it reaches capacity. Note that when iterating it should be done
- /// like this accessing the buffer directly but using the FastList.length field:
- ///
- /// for( var i = 0; i <= list.length; i++ )
- /// var item = list.buffer[i];
- ///
-
- public class FastList
- {
- ///
- /// direct access to the backing buffer. Do not use buffer.Length! Use FastList.length
- ///
- public T[] Buffer;
-
- ///
- /// direct access to the length of the filled items in the buffer. Do not change.
- ///
- public int Length = 0;
-
-
- public FastList(int size)
- {
- Buffer = new T[size];
- }
-
-
- public FastList() : this(5)
- {
- }
-
-
- ///
- /// provided for ease of access though it is recommended to just access the buffer directly.
- ///
- /// Index.
- public T this[int index] => Buffer[index];
-
-
- ///
- /// clears the list and nulls out all items in the buffer
- ///
- public void Clear()
- {
- Array.Clear(Buffer, 0, Length);
- Length = 0;
- }
-
-
- ///
- /// works just like clear except it does not null our all the items in the buffer. Useful when dealing with structs.
- ///
- public void Reset()
- {
- Length = 0;
- }
-
-
- ///
- /// adds the item to the list
- ///
- public void Add(T item)
- {
- if (Length == Buffer.Length)
- Array.Resize(ref Buffer, Math.Max(Buffer.Length << 1, 10));
- Buffer[Length++] = item;
- }
-
-
- ///
- /// removes the item from the list
- ///
- /// Item.
- public void Remove(T item)
- {
- var comp = EqualityComparer.Default;
- for (var i = 0; i < Length; ++i)
- {
- if (comp.Equals(Buffer[i], item))
- {
- RemoveAt(i);
- return;
- }
- }
- }
-
-
- ///
- /// removes the item at the given index from the list
- ///
- public void RemoveAt(int index)
- {
- Length--;
- if (index < Length)
- Array.Copy(Buffer, index + 1, Buffer, index, Length - index);
- Buffer[Length] = default(T);
- }
-
-
- ///
- /// removes the item at the given index from the list but does NOT maintain list order
- ///
- /// Index.
- public void RemoveAtWithSwap(int index)
- {
- Buffer[index] = Buffer[Length - 1];
- Buffer[Length - 1] = default(T);
- --Length;
- }
-
-
- ///
- /// checks to see if item is in the FastList
- ///
- /// Item.
- public bool Contains(T item)
- {
- var comp = EqualityComparer.Default;
- for (var i = 0; i < Length; ++i)
- {
- if (comp.Equals(Buffer[i], item))
- return true;
- }
-
- return false;
- }
-
- ///
- /// Converts To a generic List
- ///
- /// Item.
- public System.Collections.Immutable.ImmutableArray ToList()
- {
- return Buffer.ToImmutableArray();
- }
-
-
- ///
- /// if the buffer is at its max more space will be allocated to fit additionalItemCount
- ///
- public void EnsureCapacity(int additionalItemCount = 1)
- {
- if (Length + additionalItemCount >= Buffer.Length)
- Array.Resize(ref Buffer, Math.Max(Buffer.Length << 1, Length + additionalItemCount));
- }
-
-
- ///
- /// adds all items from array
- ///
- /// Array.
- public void AddRange(IEnumerable array)
- {
- foreach (var item in array)
- Add(item);
- }
-
-
- ///
- /// sorts all items in the buffer up to length
- ///
- public void Sort()
- {
- Array.Sort(Buffer, 0, Length);
- }
-
-
- ///
- /// sorts all items in the buffer up to length
- ///
- public void Sort(IComparer comparer)
- {
- Array.Sort(Buffer, 0, Length, comparer);
- }
-
-
- ///
- /// sorts all items in the buffer up to length
- ///
- public void Sort(IComparer comparer)
- {
- Array.Sort(Buffer, 0, Length, comparer);
- }
- }
-}
\ No newline at end of file
diff --git a/BlueWest.Collections/IEnumerableExtensions.cs b/BlueWest.Collections/IEnumerableExtensions.cs
deleted file mode 100644
index 268776a..0000000
--- a/BlueWest.Collections/IEnumerableExtensions.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace BlueWest.Collections
-{
- public static class IEnumerableExtensions
- {
-
- public static TSource? FirstOrNull(this TSource[] source, Func predicate) where TSource : struct =>
- source.TryGetFirst(predicate);
-
- private static TSource? TryGetFirst(this TSource[] source, Func predicate) where TSource : struct
- {
- for (var i = 0; i < source.Length; i++)
- {
- if (predicate(source[i]))
- {
- return source[i];
- }
- }
-
- return null;
- }
-
- public static TSource FirstOrNullRef(this IEnumerable source, Func predicate) where TSource : class =>
- source.TryGetFirstClass(predicate);
-
- public static TSource? FirstOrNullStruct(this IEnumerable source, Func predicate) where TSource : struct =>
- source.TryGetFirstStruct(predicate);
-
- private static TSource? TryGetFirstStruct(this IEnumerable source, Func predicate) where TSource : struct
- {
- foreach (TSource obj in source)
- {
- if (predicate(obj))
- {
- return obj;
- }
- }
- return null;
- }
- private static TSource TryGetFirstClass(this IEnumerable source, Func predicate) where TSource : class
- {
- foreach (TSource obj in source)
- {
- if (predicate(obj))
- {
- return obj;
- }
- }
- return null;
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/BlueWest.Data/BlueWest.Data.csproj b/BlueWest.Data/BlueWest.Data.csproj
index 8fae5aa..6dab272 100644
--- a/BlueWest.Data/BlueWest.Data.csproj
+++ b/BlueWest.Data/BlueWest.Data.csproj
@@ -7,17 +7,10 @@
preview
-
-
-
-
-
-
-
diff --git a/BlueWest.sln b/BlueWest.sln
index 4d58851..e8e0e2d 100644
--- a/BlueWest.sln
+++ b/BlueWest.sln
@@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Data", "BlueWest.D
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Api", "BlueWest.Api\BlueWest.Api.csproj", "{6D3321B5-CF1A-4251-B28D-329EDA6DC278}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Collections", "BlueWest.Collections\BlueWest.Collections.csproj", "{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.MapTo", "include\MapTo\src\BlueWest.MapTo\BlueWest.MapTo.csproj", "{72B37540-A12F-466E-A58F-7BA2B247CB74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleExpressionEvaluator", "include\Math-Expression-Evaluator\SimpleExpressionEvaluator\SimpleExpressionEvaluator.csproj", "{30637214-EDE9-4C2E-BFD6-E4B163FA308B}"
@@ -39,10 +37,6 @@ Global
{6D3321B5-CF1A-4251-B28D-329EDA6DC278}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D3321B5-CF1A-4251-B28D-329EDA6DC278}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D3321B5-CF1A-4251-B28D-329EDA6DC278}.Release|Any CPU.Build.0 = Release|Any CPU
- {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Release|Any CPU.Build.0 = Release|Any CPU
{72B37540-A12F-466E-A58F-7BA2B247CB74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72B37540-A12F-466E-A58F-7BA2B247CB74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72B37540-A12F-466E-A58F-7BA2B247CB74}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -65,7 +59,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{30637214-EDE9-4C2E-BFD6-E4B163FA308B} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{72B37540-A12F-466E-A58F-7BA2B247CB74} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
- {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C} = {19577B27-7EDF-4DBA-83D5-E047467BDFEF}
{E518C62D-768C-4885-9C9D-FD5761605B54} = {19577B27-7EDF-4DBA-83D5-E047467BDFEF}
{08F4484E-5FD8-4590-A8D7-12FBE47120C8} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
EndGlobalSection
diff --git a/BlueWest/BlueWest.csproj b/BlueWest/BlueWest.csproj
index 010b6bf..4860e23 100644
--- a/BlueWest/BlueWest.csproj
+++ b/BlueWest/BlueWest.csproj
@@ -5,17 +5,6 @@
enable
disable
PerformanceSolution
- true
-
-
-
-
-
-
-
-
-
-
diff --git a/BlueWest/Core/ComponentSystem/Component.cs b/BlueWest/Core/ComponentSystem/Component.cs
index 792c56d..6420807 100644
--- a/BlueWest/Core/ComponentSystem/Component.cs
+++ b/BlueWest/Core/ComponentSystem/Component.cs
@@ -1,5 +1,5 @@
using System.Collections;
-using BlueWest.Collections;
+using System.Collections.Generic;
using BlueWest.Coroutines;
using BlueWest.Tools;
@@ -11,7 +11,7 @@ namespace BlueWest.Core.ComponentSystem
public bool IsActive { get; private set; } = true;
- private readonly FastDictionary _coroutines = new FastDictionary(10000);
+ private readonly Dictionary _coroutines = new Dictionary(10000);
private int _coroutineCount = 0;
diff --git a/BlueWest/Core/Events/EventManager.cs b/BlueWest/Core/Events/EventManager.cs
index b7ce464..4b76e55 100644
--- a/BlueWest/Core/Events/EventManager.cs
+++ b/BlueWest/Core/Events/EventManager.cs
@@ -1,16 +1,16 @@
using System;
-using BlueWest.Collections;
+using System.Collections.Generic;
namespace BlueWest.Tools
{
public sealed class EventManager
{
- private readonly FastDictionary> _subscribersList;
+ private readonly Dictionary> _subscribersList;
private static EventManager _instance;
- public EventManager(FastDictionary> subscribersList)
+ public EventManager(Dictionary> subscribersList)
{
_subscribersList = subscribersList;
_instance = this;
@@ -26,7 +26,7 @@ namespace BlueWest.Tools
var eventType = typeof( TEvent );
if( !_subscribersList.ContainsKey( eventType ) )
- _subscribersList[eventType] = new FastList(10000);
+ _subscribersList[eventType] = new List(10000);
//if( !SubscriptionExists( eventType, listener ) )
_subscribersList[eventType].Add( listener );
@@ -41,15 +41,15 @@ namespace BlueWest.Tools
{
var eventType = typeof( TEvent );
- FastList subscriberList = _subscribersList[eventType];
+ List subscriberList = _subscribersList[eventType];
- for (int i = 0; i list = _subscribersList[type];
+ List list = _subscribersList[type];
- for (int i=0; i;
casted.OnEvent( newEvent );
}
@@ -94,15 +94,15 @@ namespace BlueWest.Tools
/// Receiver.
private bool SubscriptionExists( Type type, EventListenerBase receiver )
{
- FastList receivers;
+ List receivers;
if( !_subscribersList.TryGetValue( type, out receivers ) ) return false;
bool exists = false;
- for (int i=0; i> _subscribersList;
+ private static readonly Dictionary> _subscribersList;
static EventManagerAsync()
{
- _subscribersList = new FastDictionary>(12412);
+ _subscribersList = new Dictionary>(12412);
}
///
@@ -23,7 +23,7 @@ namespace BlueWest.Tools
var eventType = typeof(TEventAsync);
if (!_subscribersList.ContainsKey(eventType))
- _subscribersList[eventType] = new FastList(10000);
+ _subscribersList[eventType] = new List(10000);
//if( !SubscriptionExistsAsync( eventType, listener ) )
_subscribersList[eventType].Add(listener);
@@ -49,15 +49,15 @@ namespace BlueWest.Tools
#endif
}*/
- FastList subscriberList = _subscribersList[eventType];
+ List subscriberList = _subscribersList[eventType];
- for (int i = 0; i < subscriberList.Length; i++)
+ for (int i = 0; i < subscriberList.Count; i++)
{
- if (subscriberList.Buffer[i] == listener)
+ if (subscriberList[i] == listener)
{
subscriberList.Remove(subscriberList[i]);
- if (subscriberList.Length == 0)
+ if (subscriberList.Count == 0)
_subscribersList.Remove(eventType);
return;
@@ -74,11 +74,11 @@ namespace BlueWest.Tools
{
var type = typeof(TEvent);
- FastList list = _subscribersList[type];
+ List list = _subscribersList[type];
- for (int i = 0; i < list.Length; i++)
+ for (int i = 0; i < list.Count; i++)
{
- var baseListener = list.Buffer[i];
+ var baseListener = list[i];
var eventListenerCasted = baseListener as EventListenerAsync;
eventListenerCasted.OnEventAsync(newEvent);
}
@@ -92,15 +92,15 @@ namespace BlueWest.Tools
/// Receiver.
private static bool SubscriptionExistsAsync(Type type, EventListenerBaseAsync receiver)
{
- FastList receivers;
+ List receivers;
if (!_subscribersList.TryGetValue(type, out receivers)) return false;
bool exists = false;
- for (int i = 0; i < receivers.Length; i++)
+ for (int i = 0; i < receivers.Count; i++)
{
- var eventListenerBase = receivers.Buffer[i];
+ var eventListenerBase = receivers[i];
if (eventListenerBase == receiver)
{
return true;
diff --git a/BlueWest/Core/System/Artefact.cs b/BlueWest/Core/System/Artefact.cs
index 074376f..ebf919a 100644
--- a/BlueWest/Core/System/Artefact.cs
+++ b/BlueWest/Core/System/Artefact.cs
@@ -1,8 +1,8 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Data;
using System.Threading;
-using BlueWest.Collections;
using BlueWest.Coroutines;
using BlueWest.Tools;
@@ -41,11 +41,11 @@ namespace BlueWest.Core.ComponentSystem
private readonly TimerTick _autoTickTimer;
private TimeSpan accumulatedElapsedGameTime;
- private FastDictionary behaviorConfigType =
- new FastDictionary(10);
+ private Dictionary behaviorConfigType =
+ new Dictionary(10);
- private readonly FastList _coroutines = new FastList(10000);
+ private readonly List _coroutines = new List(10000);
private bool? _prevVisibility;
// Mini ECS
protected EventManager _eventManager;
@@ -55,7 +55,7 @@ namespace BlueWest.Core.ComponentSystem
internal VisibilityHandler _visibilityHandler = new VisibilityHandler();
- internal FastList _components = new FastList(10);
+ internal List _components = new List(10);
private int _componentsCount = 0;
@@ -149,9 +149,9 @@ namespace BlueWest.Core.ComponentSystem
public void ProcessComponents(double delta)
{
- for (int i = 0; i < _components.Length; i++)
+ for (int i = 0; i < _components.Count; i++)
{
- var component = _components.Buffer[i];
+ var component = _components[i];
component.EveryFrame(delta);
component.HandleCoroutines();
}
@@ -226,11 +226,11 @@ namespace BlueWest.Core.ComponentSystem
public void HandleCoroutines()
{
- for (var i = 0; i < _coroutines.Length; i++)
+ for (var i = 0; i < _coroutines.Count; i++)
{
- var yielded = _coroutines.Buffer[i].Current is CustomYieldInstruction yielder && yielder.MoveNext();
+ var yielded = _coroutines[i].Current is CustomYieldInstruction yielder && yielder.MoveNext();
- if (yielded || _coroutines.Buffer[i].MoveNext()) continue;
+ if (yielded || _coroutines[i].MoveNext()) continue;
_coroutines.RemoveAt(i);
i--;
}
diff --git a/BlueWest/Core/System/BlueProgram.cs b/BlueWest/Core/System/BlueProgram.cs
index 4599897..5787df1 100644
--- a/BlueWest/Core/System/BlueProgram.cs
+++ b/BlueWest/Core/System/BlueProgram.cs
@@ -1,5 +1,5 @@
using System;
-using BlueWest.Collections;
+using System.Collections.Generic;
using BlueWest.Tools;
using BlueWest.Core.Threading;
@@ -9,7 +9,7 @@ namespace BlueWest.Core
public sealed class BlueProgram
{
- private static readonly FastDictionary> Events = new(10000);
+ private static readonly Dictionary> Events = new(10000);
private static readonly EventManager EventManager = new(Events);
diff --git a/BlueWest/Tools/SaveLoader.cs b/BlueWest/Tools/SaveLoader.cs
index 91bc8de..8ea1fdf 100644
--- a/BlueWest/Tools/SaveLoader.cs
+++ b/BlueWest/Tools/SaveLoader.cs
@@ -2,7 +2,6 @@
using System.Collections;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
-using MessagePack;
using Directory = System.IO.Directory;
using File = System.IO.File;
@@ -70,12 +69,12 @@ namespace PerformanceSolution.Tools
}
// we serialize and write our object into a file on disk
- var byteData = MessagePackSerializer.Serialize(saveObject);
+ //var byteData = MessagePackSerializer.Serialize(saveObject);
File.WriteAllText(savePath + saveFileName + ".json", saveObject.ToString());
- File.WriteAllBytes(savePath + saveFileName, byteData);
+ //File.WriteAllBytes(savePath + saveFileName, byteData);
}
///
@@ -98,9 +97,10 @@ namespace PerformanceSolution.Tools
byte[] readByte = File.ReadAllBytes(saveFileName);
- var finalObject = MessagePackSerializer.Deserialize(readByte);
+ //var finalObject = MessagePackSerializer.Deserialize(readByte);
- return finalObject;
+ //return finalObject;
+ return null;
}
///
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..5cc3279
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
+FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
+WORKDIR /app
+EXPOSE 80
+EXPOSE 443
+
+FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
+WORKDIR /src
+#COPY BlueWest/*.csproj ./BlueWest/
+#COPY BlueWest.Api/*.csproj ./BlueWest.Api/
+#COPY BlueWest.Data/*.csproj ./BlueWest.Data/
+#
+#COPY include/Math-Expression-Evaluator/SimpleExpressionEvaluator/*.csproj ./include/Math-Expression-Evaluator/SimpleExpressionEvaluator/
+#COPY include/Math-Expression-Evaluator/SimpleExpressionEvaluator.Tests/*.csproj ./include/Math-Expression-Evaluator/SimpleExpressionEvaluator.Tests/
+#COPY include/MapTo/src/BlueWest.MapTo/*.csproj ./include/MapTo/src/BlueWest.MapTo/
+#COPY include/MapTo/src/BlueWest.MapTo/MapTo.props ./include/MapTo/src/BlueWest.MapTo/
+COPY ["BlueWest.Api/BlueWest.Api.csproj", "BlueWest.Api/"]
+RUN dotnet restore "BlueWest.Api/BlueWest.Api.csproj"
+COPY . .
+WORKDIR "/src/BlueWest.Api"
+RUN dotnet build "BlueWest.Api.csproj" -c Release -o /app/build
+
+FROM build AS publish
+RUN dotnet publish "BlueWest.Api.csproj" -c Release -o /app/publish --self-contained false
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "BlueWest.Api.dll"]
\ No newline at end of file
diff --git a/Dockerfile_old b/Dockerfile_old
new file mode 100644
index 0000000..a1c21b2
--- /dev/null
+++ b/Dockerfile_old
@@ -0,0 +1,30 @@
+# https://hub.docker.com/_/microsoft-dotnet
+FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
+WORKDIR /source
+
+# copy csproj and restore as distinct layers
+COPY *.sln .
+COPY BlueWest/*.csproj ./BlueWest/
+COPY BlueWest.Api/*.csproj ./BlueWest.Api/
+COPY BlueWest.Data/*.csproj ./BlueWest.Data/
+
+COPY include/Math-Expression-Evaluator/SimpleExpressionEvaluator/*.csproj ./include/Math-Expression-Evaluator/SimpleExpressionEvaluator/
+COPY include/Math-Expression-Evaluator/SimpleExpressionEvaluator.Tests/*.csproj ./include/Math-Expression-Evaluator/SimpleExpressionEvaluator.Tests/
+COPY include/MapTo/src/BlueWest.MapTo/*.csproj ./include/MapTo/src/BlueWest.MapTo/
+COPY include/MapTo/src/BlueWest.MapTo/MapTo.props ./include/MapTo/src/BlueWest.MapTo/
+
+RUN dotnet restore
+
+# copy everything else and build app
+COPY BlueWest/. ./BlueWest/
+WORKDIR /source/BlueWest.Api
+#RUN dotnet publish -c release -o /app --no-restore
+RUN mkdir -p xo
+
+RUN dotnet publish "BlueWest.Api.csproj" -c Release -o xo --no-restore
+
+workdir xo
+
+# final stage/image
+FROM mcr.microsoft.com/dotnet/aspnet:6.0
+ENTRYPOINT ["dotnet", "BlueWest.Api.dll"]
diff --git a/include/MapTo b/include/MapTo
index 7760364..ca82e6f 160000
--- a/include/MapTo
+++ b/include/MapTo
@@ -1 +1 @@
-Subproject commit 77603643b4940caf1d896a40dfa0a1258586c936
+Subproject commit ca82e6fb176f47105cf1934ba2f9ea42362e11bf
diff --git a/include/Math-Expression-Evaluator b/include/Math-Expression-Evaluator
index bc7ff8b..0761d24 160000
--- a/include/Math-Expression-Evaluator
+++ b/include/Math-Expression-Evaluator
@@ -1 +1 @@
-Subproject commit bc7ff8bced98c9e58ae1b55133909cd76effb210
+Subproject commit 0761d24843de941c47010bf796c60b610e738735