Skip to content

Commit 4d32230

Browse files
authored
Merge pull request #99 from ChaosEngine/dev
Dev -> Master promotion
2 parents a7c4a03 + 528e07c commit 4d32230

22 files changed

+154
-155
lines changed

src/InkBall.Module/Areas/InkBall/Pages/Game.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@
100100
}
101101
</environment>
102102
<environment exclude="Development">
103-
<script defer src="https://cdn.jsdelivr.net/npm/@@microsoft/signalr@5.0.11/dist/browser/signalr.min.js" integrity="sha256-SMd5+n5UiWqz1CHObTcgHBGI7wyRW3fBwK7UP8L8plo=" crossorigin="anonymous"></script>
103+
<script defer src="https://cdn.jsdelivr.net/npm/@@microsoft/signalr@6.0.1/dist/browser/signalr.min.js" integrity="sha256-aNSbXaEA6wcVsUTxsuF1mI+mKauMNEMkhXShRZaQMnE=" crossorigin="anonymous"></script>
104104
@if (useMessagePackBinaryTransport)
105105
{
106106
@:<script type='module' src="https://cdn.jsdelivr.net/npm/[email protected]/dist/msgpack5.min.js" integrity="sha256-YNDaaIkCIrzWZlbWxFzF+g9pn1F5tkgTGaNSLs/HCbU=" crossorigin="anonymous"></script>
107-
@:<script type='module' src="https://cdn.jsdelivr.net/npm/@@microsoft/signalr-protocol-msgpack@5.0.11/dist/browser/signalr-protocol-msgpack.min.js" integrity="sha256-SQ/Dkr9tMBwX028EuD6x5kcnq0HxMHmAejzdv9bA8Vc=" crossorigin="anonymous"></script>
107+
@:<script type='module' src="https://cdn.jsdelivr.net/npm/@@microsoft/signalr-protocol-msgpack@6.0.1/dist/browser/signalr-protocol-msgpack.min.js" integrity="sha256-BfDutjcsENkSQpi5MKW+E890Cx5PvZWI3H3o/MTBxbQ=" crossorigin="anonymous"></script>
108108
}
109109
</environment>
110110
<script type='text/javascript'>
File renamed without changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using InkBall.Module.Model;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Text.Json.Serialization;
7+
using System.Threading.Tasks;
8+
9+
namespace InkBall.Module
10+
{
11+
[JsonSerializable(typeof(ApplicationUserSettings))]
12+
public partial class ApplicationUserSettingsContext : JsonSerializerContext
13+
{
14+
}
15+
}

src/InkBall.Module/InkBall.Module.csproj

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
66
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
77
<LangVersion>latest</LangVersion>
8-
<Version>1.0.1.14</Version>
8+
<Version>1.0.1.15</Version>
99
<Configurations>Debug;Release;Oracle</Configurations>
1010
</PropertyGroup>
1111

1212
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
1313
<DefineConstants>TRACE;INCLUDE_ORACLE;INCLUDE_SQLSERVER;INCLUDE_POSTGRES</DefineConstants>
14-
<!--<DefineConstants>TRACE;INCLUDE_ORACLE</DefineConstants>-->
1514
</PropertyGroup>
1615
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Oracle|AnyCPU'">
1716
<DefineConstants>INCLUDE_ORACLE</DefineConstants>
1817
</PropertyGroup>
1918

2019
<ItemGroup>
2120
<FrameworkReference Include="Microsoft.AspNetCore.App" />
22-
<!--<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />-->
23-
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="5.0.11" />
24-
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.11" />
25-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.11" />
26-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.10" Condition="$(DefineConstants.Contains('INCLUDE_POSTGRES'))" />
27-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.2" />
28-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.11" Condition="$(DefineConstants.Contains('INCLUDE_SQLSERVER'))" />
29-
<PackageReference Include="Oracle.EntityFrameworkCore" Version="5.21.4" Condition="$(DefineConstants.Contains('INCLUDE_ORACLE'))" />
21+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
22+
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="6.0.1" />
23+
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.1" />
24+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
25+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.2" Condition="$(DefineConstants.Contains('INCLUDE_POSTGRES'))" />
26+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
27+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" Condition="$(DefineConstants.Contains('INCLUDE_SQLSERVER'))" />
28+
<PackageReference Include="Oracle.EntityFrameworkCore" Version="6.21.5" Condition="$(DefineConstants.Contains('INCLUDE_ORACLE'))" />
3029
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
31-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="5.0.11" />
30+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="6.0.1" />
3231
<PackageReference Include="MessagePack" Version="2.3.85" />
3332
</ItemGroup>
3433

src/InkBall.Module/Model/GamesContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ static void jsonPath_HandlerImpl(InkBallPath path, InkBallPathViewModel fromJson
802802
fromJson.iGameId = 0;
803803
fromJson.iPlayerId = path.iPlayerId;
804804

805-
//var reserialized = JsonSerializer.Serialize(fromJson, new JsonSerializerOptions { IgnoreNullValues = true });
805+
//var reserialized = JsonSerializer.Serialize(fromJson, new JsonSerializerOptions { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull });
806806
var reserialized = JsonSerializer.Serialize(fromJson, _ignoreDefaultsSerializerOptions);
807807

808808
path.PointsAsString = reserialized;

src/InkBall.Module/Model/INamedAgedUser.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.ComponentModel.DataAnnotations.Schema;
2+
using System.Text.Json.Serialization;
23
using MessagePack;
34
using Microsoft.AspNetCore.Identity;
45

@@ -11,13 +12,15 @@ namespace InkBall.Module.Model
1112
public interface IApplicationUserSettings
1213
{
1314
[PersonalData]
15+
//[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
1416
bool DesktopNotifications { get; set; }
1517
}
1618

1719
[MessagePackObject(true)]
1820
public sealed class ApplicationUserSettings : IApplicationUserSettings, IDtoMsg
1921
{
2022
[PersonalData]
23+
//[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
2124
public bool DesktopNotifications { get; set; }
2225

2326
public CommandKindEnum GetKind()
@@ -31,19 +34,14 @@ public interface INamedAgedUser
3134
/// <summary>
3235
// User name
3336
/// </summary>
34-
string Name { get; }
35-
36-
///// <summary>
37-
//// User age
38-
///// </summary>
39-
//int Age { get; }
37+
string Name { get; set; }
4038

4139
/// <summary>
4240
// Various user settings
4341
/// </summary>
4442
[PersonalData]
4543
[NotMapped]
46-
IApplicationUserSettings UserSettings { get; set; }
44+
ApplicationUserSettings UserSettings { get; set; }
4745

4846
/// <summary>
4947
// Various user settings as JSON

src/InkBall.Module/Model/InkBallPath.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ public string SerializeThin()
444444

445445
//string last_move_and_path_json = JsonSerializer.Serialize(thin_path, new JsonSerializerOptions
446446
//{
447-
// //IgnoreNullValues = true,
447+
// //DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
448448
// DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault
449449
//});
450450
string last_move_and_path_json = JsonSerializer.Serialize(thin_path);

src/InkBall.Module/Model/InkBallPoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public InkBallPoint()
275275
public sealed class InkBallPointViewModel : CommonPoint, IPoint, ILastMoveTimestamp,
276276
IThinPoint, IThisSerializablePoint<InkBallPointViewModel>
277277
{
278-
//static readonly JsonSerializerOptions _ignoreNullJsonSerializerOptions = new JsonSerializerOptions { IgnoreNullValues = true };
278+
//static readonly JsonSerializerOptions _ignoreNullJsonSerializerOptions = new JsonSerializerOptions { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull };
279279

280280
/// <summary>
281281
/// Helper for serialization only selected properties

src/InkBall.Module/wwwroot/js/AIWorker.PolyfillBundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/InkBall.Module/wwwroot/js/inkball.Bundle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
240240

241241
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
242242

243-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
243+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
244244

245245
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
246246

@@ -258,7 +258,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
258258

259259
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
260260

261-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
261+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
262262

263263
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
264264

@@ -276,7 +276,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
276276

277277
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
278278

279-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
279+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
280280

281281
var SHRD, LocalLog, LocalError, StatusEnum, hasDuplicates, pnpoly2, sortPointsClockwise, Sleep, isESModuleSupport;
282282
/******** funcs-n-classes ********/

0 commit comments

Comments
 (0)