mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Upgrading YamlDotNet from 11.1.1 to 16.3.0
This commit is contained in:
@@ -117,8 +117,8 @@
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\YamlDotNet.11.1.1\lib\net45\YamlDotNet.dll</HintPath>
|
||||
<Reference Include="YamlDotNet, Version=16.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\YamlDotNet.16.3.0\lib\net47\YamlDotNet.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
+3
-2
@@ -8,9 +8,10 @@ namespace Orchard.Layouts.Serialization {
|
||||
public class LocalizedStringYamlConverter : IYamlTypeConverter {
|
||||
public bool Accepts(Type type) => type == typeof(LocalizedString);
|
||||
|
||||
public object ReadYaml(IParser parser, Type type) => new LocalizedString(parser.Consume<Scalar>()?.Value);
|
||||
public object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) =>
|
||||
new LocalizedString(parser.Consume<Scalar>()?.Value);
|
||||
|
||||
public void WriteYaml(IEmitter emitter, object value, Type type) =>
|
||||
public void WriteYaml(IEmitter emitter, object value, Type type, ObjectSerializer serializer) =>
|
||||
emitter.Emit(new Scalar((value as LocalizedString)?.Text ?? ""));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
|
||||
<package id="YamlDotNet" version="11.1.1" targetFramework="net48" />
|
||||
<package id="YamlDotNet" version="16.3.0" targetFramework="net48" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user