small changes based on review.
This commit is contained in:
@@ -9,7 +9,7 @@ using Umbraco.Core.Migrations.Upgrade.V_8_1_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_6_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_9_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_10_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_12_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_15_0;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade
|
||||
{
|
||||
@@ -203,7 +203,7 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
// to 8.10.0
|
||||
To<AddPropertyTypeLabelOnTopColumn>("{D6A8D863-38EC-44FB-91EC-ACD6A668BD18}");
|
||||
|
||||
// to 8.12.0...
|
||||
// to 8.15.0...
|
||||
To<AddCmsContentNuByteColumn>("{8DDDCD0B-D7D5-4C97-BD6A-6B38CA65752F}");
|
||||
To<UpgradedIncludeIndexes>("{4695D0C9-0729-4976-985B-048D503665D8}");
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_12_0
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_15_0
|
||||
{
|
||||
public class AddCmsContentNuByteColumn : MigrationBase
|
||||
{
|
||||
@@ -3,7 +3,7 @@ using Umbraco.Core.Migrations.Expressions.Execute.Expressions;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_12_0
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_15_0
|
||||
{
|
||||
public class UpgradedIncludeIndexes : MigrationBase
|
||||
{
|
||||
@@ -139,8 +139,8 @@
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\ContentTypeDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyDataDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyTypeDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_12_0\AddCmsContentNuByteColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_12_0\UpgradedIncludeIndexes.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_15_0\AddCmsContentNuByteColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_15_0\UpgradedIncludeIndexes.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_10_0\AddPropertyTypeLabelOnTopColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_9_0\ExternalLoginTableUserData.cs" />
|
||||
<Compile Include="Models\Blocks\BlockEditorDataConverter.cs" />
|
||||
|
||||
@@ -79,8 +79,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Castle.Core" Version="4.4.1" />
|
||||
<PackageReference Include="Examine" Version="1.0.2" />
|
||||
<PackageReference Include="Castle.Core" Version="4.3.1" />
|
||||
<PackageReference Include="Examine" Version="1.2.0" />
|
||||
<PackageReference Include="HtmlAgilityPack">
|
||||
<Version>1.8.14</Version>
|
||||
@@ -102,10 +100,7 @@
|
||||
<PackageReference Include="Microsoft.Owin.Testing" Version="4.0.1" />
|
||||
<PackageReference Include="Microsoft.Web.Infrastructure" Version="1.0.0.0" />
|
||||
<PackageReference Include="MiniProfiler" Version="4.0.138" />
|
||||
<PackageReference Include="Moq">
|
||||
<Version>4.14.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Moq" Version="4.10.1" />
|
||||
<PackageReference Include="Moq" Version="4.14.5" />
|
||||
<PackageReference Include="NPoco" Version="3.9.4" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
|
||||
|
||||
@@ -28,8 +28,9 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
// TODO: We want to be able to intern the strings for aliases when deserializing like we do for Newtonsoft but I'm unsure exactly how
|
||||
// to do that but it would seem to be with a custom message pack resolver but I haven't quite figured out based on the docs how
|
||||
// to do that since that is part of the int key -> string mapping operation, might have to see the source code to figure that one out.
|
||||
|
||||
// resolver custom types first
|
||||
// There are docs here on how to build one of these: https://github.com/neuecc/MessagePack-CSharp/blob/master/README.md#low-level-api-imessagepackformattert
|
||||
// and there are a couple examples if you search on google for them but this will need to be a separate project.
|
||||
// NOTE: resolver custom types first
|
||||
// new ContentNestedDataResolver(),
|
||||
|
||||
// finally use standard resolver
|
||||
@@ -121,87 +122,5 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//private class ContentNestedDataResolver : IFormatterResolver
|
||||
//{
|
||||
// // GetFormatter<T>'s get cost should be minimized so use type cache.
|
||||
// public IMessagePackFormatter<T> GetFormatter<T>() => FormatterCache<T>.Formatter;
|
||||
|
||||
// private static class FormatterCache<T>
|
||||
// {
|
||||
// public static readonly IMessagePackFormatter<T> Formatter;
|
||||
|
||||
// // generic's static constructor should be minimized for reduce type generation size!
|
||||
// // use outer helper method.
|
||||
// static FormatterCache()
|
||||
// {
|
||||
// Formatter = (IMessagePackFormatter<T>)SampleCustomResolverGetFormatterHelper.GetFormatter(typeof(T));
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//internal static class SampleCustomResolverGetFormatterHelper
|
||||
//{
|
||||
// // If type is concrete type, use type-formatter map
|
||||
// static readonly Dictionary<Type, object> _formatterMap = new Dictionary<Type, object>()
|
||||
// {
|
||||
// {typeof(ContentNestedData), new ContentNestedDataFormatter()}
|
||||
// // add more your own custom serializers.
|
||||
// };
|
||||
|
||||
// internal static object GetFormatter(Type t)
|
||||
// {
|
||||
// object formatter;
|
||||
// if (_formatterMap.TryGetValue(t, out formatter))
|
||||
// {
|
||||
// return formatter;
|
||||
// }
|
||||
|
||||
// // If target type is generics, use MakeGenericType.
|
||||
// if (t.IsGenericParameter && t.GetGenericTypeDefinition() == typeof(ValueTuple<,>))
|
||||
// {
|
||||
// return Activator.CreateInstance(typeof(ValueTupleFormatter<,>).MakeGenericType(t.GenericTypeArguments));
|
||||
// }
|
||||
|
||||
// // If type can not get, must return null for fallback mechanism.
|
||||
// return null;
|
||||
// }
|
||||
//}
|
||||
|
||||
//public class ContentNestedDataFormatter : IMessagePackFormatter<ContentNestedData>
|
||||
//{
|
||||
// public void Serialize(ref MessagePackWriter writer, ContentNestedData value, MessagePackSerializerOptions options)
|
||||
// {
|
||||
// if (value == null)
|
||||
// {
|
||||
// writer.WriteNil();
|
||||
// return;
|
||||
// }
|
||||
|
||||
// writer.WriteArrayHeader(3);
|
||||
// writer.WriteString(value.UrlSegment);
|
||||
// writer.WriteString(value.FullName);
|
||||
// writer.WriteString(value.Age);
|
||||
|
||||
// writer.WriteString(value.FullName);
|
||||
// }
|
||||
|
||||
// public ContentNestedData Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
|
||||
// {
|
||||
// if (reader.TryReadNil())
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// options.Security.DepthStep(ref reader);
|
||||
|
||||
// var path = reader.ReadString();
|
||||
|
||||
// reader.Depth--;
|
||||
// return new FileInfo(path);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user