Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 237a371

Browse files
committed
Upgrade to 6.0.0
1 parent ac60a4c commit 237a371

18 files changed

+21
-111
lines changed

NuGet.Config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="ServiceStack CI feed" value="http://build.servicestack.net/guestAuth/app/nuget/v1/FeedService.svc" />
4+
<!-- <add key="ServiceStack CI feed" value="http://build.servicestack.net/guestAuth/app/nuget/v1/FeedService.svc" /> -->
55
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
66
</packageSources>
77
</configuration>

build/build-core.proj

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="$(MSBuildProjectDirectory)/build.tasks" />
55

66
<PropertyGroup>
7-
<MajorVersion Condition="$(MajorVersion) == ''">5</MajorVersion>
7+
<MajorVersion Condition="$(MajorVersion) == ''">6</MajorVersion>
88
<MinorVersion Condition="$(MinorVersion) == ''">0</MinorVersion>
99
<PatchVersion Condition="$(PatchVersion) == ''">$(BUILD_NUMBER)</PatchVersion>
1010
</PropertyGroup>
@@ -41,7 +41,6 @@
4141
<!-- need to remove old caches from nuget restore from .Core csproj's -->
4242
<Target Name="ClearNuGetRestoreCaches">
4343
<RemoveDir Directories="$(SrcDir)/ServiceStack.Text/obj" />
44-
<RemoveDir Directories="$(SrcDir)/ServiceStack.Memory/obj" />
4544
<RemoveDir Directories="$(TestsDir)/ServiceStack.Text.Tests/obj" />
4645
<RemoveDir Directories="$(TestsDir)/ServiceStack.Text.TestsConsole/obj" />
4746
</Target>

build/build-deps.proj

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="$(MSBuildProjectDirectory)/build.tasks" />
55

66
<PropertyGroup>
7-
<MajorVersion Condition="$(MajorVersion) == ''">5</MajorVersion>
7+
<MajorVersion Condition="$(MajorVersion) == ''">6</MajorVersion>
88
<MinorVersion Condition="$(MinorVersion) == ''">0</MinorVersion>
99
<PatchVersion Condition="$(PatchVersion) == ''">$(BUILD_NUMBER)</PatchVersion>
1010
</PropertyGroup>
@@ -32,14 +32,12 @@
3232

3333
<Target Name="BuildSolutions">
3434
<CallTarget Targets="ClearNuGetRestoreCaches" />
35-
<MSBuild Projects="$(BuildSolutionDir)/src/ServiceStack.Memory/ServiceStack.Memory.csproj" Targets="Restore" />
3635
<MSBuild Projects="$(BuildSolutionDir)/src/ServiceStack.Text/ServiceStack.Text.csproj" Targets="Restore" />
3736
</Target>
3837

3938
<!-- need to remove old caches from nuget restore from .Core csproj's -->
4039
<Target Name="ClearNuGetRestoreCaches">
4140
<RemoveDir Directories="$(SrcDir)/ServiceStack.Text/obj" />
42-
<RemoveDir Directories="$(SrcDir)/ServiceStack.Memory/obj" />
4341
<RemoveDir Directories="$(TestsDir)/ServiceStack.Text.Tests/obj" />
4442
<RemoveDir Directories="$(TestsDir)/ServiceStack.Text.TestsConsole/obj" />
4543
</Target>
@@ -69,11 +67,6 @@
6967

7068
<Target Name="Default" DependsOnTargets="$(DoBuildSolutionsDependsOn)">
7169

72-
<!-- ServiceStack.Memory -->
73-
<MSBuild Projects="$(BuildSolutionDir)/src/ServiceStack.Memory/ServiceStack.Memory.csproj"
74-
Targets="Build;Pack"
75-
Properties="Configuration=$(Configuration)" />
76-
7770
<!-- ServiceStack.Text -->
7871
<MSBuild Projects="$(BuildSolutionDir)/src/ServiceStack.Text/ServiceStack.Text.csproj"
7972
Targets="Build;Pack"

build/build.proj

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="$(MSBuildProjectDirectory)/build.tasks" />
55

66
<PropertyGroup>
7-
<MajorVersion Condition="$(MajorVersion) == ''">5</MajorVersion>
7+
<MajorVersion Condition="$(MajorVersion) == ''">6</MajorVersion>
88
<MinorVersion Condition="$(MinorVersion) == ''">0</MinorVersion>
99
<PatchVersion Condition="$(PatchVersion) == ''">$(BUILD_NUMBER)</PatchVersion>
1010
</PropertyGroup>
@@ -47,7 +47,6 @@
4747
<!-- need to remove old caches from nuget restore from .Core csproj's -->
4848
<Target Name="ClearNuGetRestoreCaches">
4949
<RemoveDir Directories="$(SrcDir)/ServiceStack.Text/obj" />
50-
<RemoveDir Directories="$(SrcDir)/ServiceStack.Memory/obj" />
5150
<RemoveDir Directories="$(TestsDir)/ServiceStack.Text.Tests/obj" />
5251
<RemoveDir Directories="$(TestsDir)/ServiceStack.Text.TestsConsole/obj" />
5352
</Target>
@@ -77,11 +76,6 @@
7776

7877
<Target Name="Default" DependsOnTargets="$(DoBuildSolutionsDependsOn)">
7978

80-
<!-- ServiceStack.Memory -->
81-
<MSBuild Projects="$(BuildSolutionDir)/src/ServiceStack.Memory/ServiceStack.Memory.csproj"
82-
Targets="Build;Pack"
83-
Properties="Configuration=$(Configuration)" />
84-
8579
<!-- ServiceStack.Text -->
8680
<MSBuild Projects="$(BuildSolutionDir)/src/ServiceStack.Text/ServiceStack.Text.csproj"
8781
Targets="Build;Pack"

src/Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<Version>5.14.0</Version>
4+
<Version>6.0.0</Version>
55
<Authors>ServiceStack</Authors>
66
<Company>ServiceStack, Inc.</Company>
77
<Copyright>&#169; 2008-2022 ServiceStack, Inc</Copyright>
@@ -24,7 +24,7 @@
2424
<Optimize>true</Optimize>
2525
</PropertyGroup>
2626

27-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'net451' OR '$(TargetFramework)' == 'net452' OR '$(TargetFramework)' == 'net46' OR '$(TargetFramework)' == 'net472' ">
27+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
2828
<DefineConstants>$(DefineConstants);NETFX;NET45</DefineConstants>
2929
<SignAssembly>True</SignAssembly>
3030
<DelaySign>False</DelaySign>

src/ServiceStack.Text.sln

-6
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceStack.Text.Tests", "
2121
EndProject
2222
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceStack.Text.TestsConsole", "..\tests\ServiceStack.Text.TestsConsole\ServiceStack.Text.TestsConsole.csproj", "{DD3BEB33-2509-423A-8545-CE1A83684530}"
2323
EndProject
24-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Memory", "ServiceStack.Memory\ServiceStack.Memory.csproj", "{7128E4DB-6C8B-4EFC-A04D-DDDF8A58BB53}"
25-
EndProject
2624
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Text.Benchmarks", "..\tests\ServiceStack.Text.Benchmarks\ServiceStack.Text.Benchmarks.csproj", "{FF1E5617-FD95-496F-B591-17DA6E0B364F}"
2725
EndProject
2826
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Northwind.Common", "..\tests\Northwind.Common\Northwind.Common.csproj", "{573926E5-F332-462D-A740-31706708A032}"
@@ -45,10 +43,6 @@ Global
4543
{DD3BEB33-2509-423A-8545-CE1A83684530}.Debug|Any CPU.Build.0 = Debug|Any CPU
4644
{DD3BEB33-2509-423A-8545-CE1A83684530}.Release|Any CPU.ActiveCfg = Release|Any CPU
4745
{DD3BEB33-2509-423A-8545-CE1A83684530}.Release|Any CPU.Build.0 = Release|Any CPU
48-
{7128E4DB-6C8B-4EFC-A04D-DDDF8A58BB53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
49-
{7128E4DB-6C8B-4EFC-A04D-DDDF8A58BB53}.Debug|Any CPU.Build.0 = Debug|Any CPU
50-
{7128E4DB-6C8B-4EFC-A04D-DDDF8A58BB53}.Release|Any CPU.ActiveCfg = Release|Any CPU
51-
{7128E4DB-6C8B-4EFC-A04D-DDDF8A58BB53}.Release|Any CPU.Build.0 = Release|Any CPU
5246
{FF1E5617-FD95-496F-B591-17DA6E0B364F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5347
{FF1E5617-FD95-496F-B591-17DA6E0B364F}.Debug|Any CPU.Build.0 = Debug|Any CPU
5448
{FF1E5617-FD95-496F-B591-17DA6E0B364F}.Release|Any CPU.ActiveCfg = Release|Any CPU

src/ServiceStack.Text/Env.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static Env()
117117

118118
public static string VersionString { get; set; }
119119

120-
public static decimal ServiceStackVersion = 5.14m;
120+
public static decimal ServiceStackVersion = 6.00m;
121121

122122
public static bool IsLinux { get; set; }
123123

src/ServiceStack.Text/MemoryProvider.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public abstract class MemoryProvider
1313
{
1414
public static MemoryProvider Instance =
1515
#if NETCORE && !NETSTANDARD2_0
16-
ServiceStack.Memory.NetCoreMemory.Provider;
16+
NetCoreMemory.Provider;
1717
#else
1818
DefaultMemory.Provider;
1919
#endif

src/ServiceStack.Text/NetCoreMemory.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
using System.Text;
88
using System.Threading;
99
using System.Threading.Tasks;
10-
using ServiceStack.Text;
1110
using ServiceStack.Text.Common;
1211
using ServiceStack.Text.Pools;
1312

14-
namespace ServiceStack.Memory
13+
namespace ServiceStack.Text
1514
{
1615
public sealed class NetCoreMemory : MemoryProvider
1716
{

src/ServiceStack.Text/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
[assembly: ComVisible(false)]
44
[assembly: Guid("a352d4d3-df2a-4c78-b646-67181a6333a6")]
5-
[assembly: System.Reflection.AssemblyVersion("5.0.0.0")]
5+
[assembly: System.Reflection.AssemblyVersion("6.0.0.0")]

src/ServiceStack.Text/ServiceStack.Text.Core.csproj

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<PackageId>ServiceStack.Text.Core</PackageId>
44
<AssemblyName>ServiceStack.Text</AssemblyName>
55
<RootNamespace>ServiceStack.Text</RootNamespace>
6-
<!-- <TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks> -->
7-
<TargetFrameworks>netstandard2.0;netcoreapp2.1;net6.0</TargetFrameworks>
6+
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
87
<Title>ServiceStack.Text .NET Standard 2.0</Title>
98
<PackageDescription>
109
.NET's fastest JSON, JSV and CSV Text Serializers. Fast, Light, Resilient.
@@ -14,9 +13,6 @@
1413
<PackageTags>JSON;Text;Serializer;CSV;JSV;HTTP;Auto Mapping;Dump;Reflection;JS;Utils;Fast</PackageTags>
1514
<NoWarn>1591</NoWarn>
1615
</PropertyGroup>
17-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
18-
<DefineConstants>$(DefineConstants);NETCORE;NETCORE2_1</DefineConstants>
19-
</PropertyGroup>
2016
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
2117
<DefineConstants>$(DefineConstants);NETSTANDARD;NET6_0</DefineConstants>
2218
</PropertyGroup>
@@ -28,11 +24,6 @@
2824
<PackageReference Include="System.Runtime" Version="4.3.1" />
2925
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.1" />
3026
</ItemGroup>
31-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
32-
<PackageReference Include="System.Runtime" Version="4.3.1" />
33-
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
34-
<PackageReference Include="System.Reflection.Emit.LightWeight" Version="4.7.0" />
35-
</ItemGroup>
3627
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
3728
<PackageReference Include="System.Runtime" Version="4.3.1" />
3829
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />

src/ServiceStack.Text/ServiceStack.Text.csproj

+2-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<PackageId>ServiceStack.Text</PackageId>
44
<AssemblyName>ServiceStack.Text</AssemblyName>
5-
<TargetFrameworks>net45;netstandard2.0;netcoreapp2.1;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;netstandard2.0;net6.0</TargetFrameworks>
66
<Title>.NET's fastest JSON Serializer by ServiceStack</Title>
77
<PackageDescription>
88
.NET's fastest JSON, JSV and CSV Text Serializers. Fast, Light, Resilient.
@@ -15,28 +15,20 @@
1515
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
1616
<DefineConstants>$(DefineConstants);NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
1717
</PropertyGroup>
18-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
19-
<DefineConstants>$(DefineConstants);NETCORE;NETCORE2_1</DefineConstants>
20-
</PropertyGroup>
2118
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
2219
<DefineConstants>$(DefineConstants);NETCORE;NET6_0;NET6_0_OR_GREATER</DefineConstants>
2320
</PropertyGroup>
2421
<ItemGroup>
2522
<PackageReference Include="System.Memory" Version="4.5.4" />
2623
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
2724
</ItemGroup>
28-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
25+
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
2926
<Reference Include="System.Configuration" />
3027
</ItemGroup>
3128
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
3229
<PackageReference Include="System.Runtime" Version="4.3.1" />
3330
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.1" />
3431
</ItemGroup>
35-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
36-
<PackageReference Include="System.Runtime" Version="4.3.1" />
37-
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
38-
<PackageReference Include="System.Reflection.Emit.LightWeight" Version="4.7.0" />
39-
</ItemGroup>
4032
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
4133
<PackageReference Include="System.Runtime" Version="4.3.1" />
4234
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />

tests/Directory.Build.props

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<Version>5.14.0</Version>
4+
<Version>6.0.0</Version>
55
<LangVersion>latest</LangVersion>
66
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
77
</PropertyGroup>
@@ -10,18 +10,6 @@
1010
<DefineConstants>DEBUG</DefineConstants>
1111
</PropertyGroup>
1212

13-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
14-
<DefineConstants>$(DefineConstants);NETFX;NET45</DefineConstants>
15-
</PropertyGroup>
16-
17-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
18-
<DefineConstants>$(DefineConstants);NETFX;NET46</DefineConstants>
19-
</PropertyGroup>
20-
21-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
22-
<DefineConstants>$(DefineConstants);NETFX;NET461</DefineConstants>
23-
</PropertyGroup>
24-
2513
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
2614
<DefineConstants>$(DefineConstants);NETFX;NET472</DefineConstants>
2715
</PropertyGroup>
@@ -30,15 +18,11 @@
3018
<DefineConstants>$(DefineConstants);NETCORE;NETSTANDARD2_0</DefineConstants>
3119
</PropertyGroup>
3220

33-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
34-
<DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD2_1</DefineConstants>
35-
</PropertyGroup>
36-
3721
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
3822
<DefineConstants>$(DefineConstants);NET6_0;NET6_0_OR_GREATER</DefineConstants>
3923
</PropertyGroup>
4024

41-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net5.0' OR '$(TargetFramework)' == 'net6.0' ">
25+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net5.0' OR '$(TargetFramework)' == 'net6.0' ">
4226
<DefineConstants>$(DefineConstants);NETCORE;NETCORE_SUPPORT</DefineConstants>
4327
</PropertyGroup>
4428

tests/Northwind.Common/Northwind.Common.csproj

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net6.0</TargetFrameworks>
55
<AssemblyName>Northwind.Common</AssemblyName>
66
<PackageId>Northwind.Common</PackageId>
77
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
@@ -29,25 +29,18 @@
2929
<PackageReference Include="ServiceStack.Interfaces" Version="5.*" />
3030
</ItemGroup>
3131

32-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
32+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
3333
<DefineConstants>$(DefineConstants);NET45</DefineConstants>
3434
</PropertyGroup>
35-
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
35+
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
3636
<Reference Include="System.Configuration" />
3737
<Reference Include="System.Threading" />
3838
<Reference Include="System.Threading.Tasks" />
3939
<Reference Include="Microsoft.CSharp" />
4040
</ItemGroup>
4141

42-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
42+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
4343
<DefineConstants>$(DefineConstants);NETSTANDARD2_0</DefineConstants>
4444
</PropertyGroup>
45-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
46-
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.1.1" />
47-
<PackageReference Include="System.Runtime" Version="4.3.1" />
48-
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
49-
<PackageReference Include="System.Reflection.Emit.LightWeight" Version="4.7.0" />
50-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
51-
</ItemGroup>
5245

5346
</Project>

tests/ServiceStack.Text.Benchmarks/MemoryProviderBenchmarks.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Globalization;
33
using BenchmarkDotNet.Attributes;
4-
using ServiceStack.Memory;
54

65
namespace ServiceStack.Text.Benchmarks
76
{
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
4+
<TargetFramework>net6.0</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
77
<PackageReference Include="BenchmarkDotNet" Version="0.10.14" />
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<ProjectReference Include="..\..\src\ServiceStack.Text\ServiceStack.Text.csproj" />
1212
</ItemGroup>
13-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
13+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
1414
<DefineConstants>$(DefineConstants);NETSTANDARD;NETCORE;NETCORE2_1</DefineConstants>
1515
</PropertyGroup>
1616
</Project>

tests/ServiceStack.Text.Tests/DataContractTests.cs

-27
Original file line numberDiff line numberDiff line change
@@ -258,40 +258,13 @@ public void Json_Serialize_Should_Respects_DataContract_Field_Name_With_Bytes_De
258258
Assert.IsTrue (t.Bytes.AreEqual (new byte[] { 0x61, 0x62 }));
259259
}
260260

261-
#if !NETCORE
262-
[Test]
263-
public void Can_get_weak_DataMember()
264-
{
265-
var dto = new ClassOne();
266-
var dataMemberAttr = dto.GetType().GetProperty("Id").GetWeakDataMember();
267-
Assert.That(dataMemberAttr.Name, Is.Null);
268-
269-
dataMemberAttr = dto.GetType().GetProperty("List").GetWeakDataMember();
270-
Assert.That(dataMemberAttr.Name, Is.EqualTo("listClassTwo"));
271-
Assert.That(dataMemberAttr.Order, Is.EqualTo(1));
272-
}
273-
#endif
274-
275261
[DataContract(Name = "my-class", Namespace = "http://schemas.ns.com")]
276262
public class MyClass
277263
{
278264
[DataMember(Name = "some-title")]
279265
public string Title { get; set; }
280266
}
281267

282-
#if !NETCORE
283-
[Test]
284-
public void Can_get_weak_DataContract()
285-
{
286-
var mc = new MyClass { Title = "Some random title" };
287-
288-
var attr = mc.GetType().GetWeakDataContract();
289-
290-
Assert.That(attr.Name, Is.EqualTo("my-class"));
291-
Assert.That(attr.Namespace, Is.EqualTo("http://schemas.ns.com"));
292-
}
293-
#endif
294-
295268
[Test]
296269
public void Does_use_DataMember_Name()
297270
{

tests/ServiceStack.Text.Tests/ServiceStack.Text.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
<DefineConstants>$(DefineConstants);NETCORE;NETSTANDARD2_0</DefineConstants>
5555
</PropertyGroup>
5656
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
57-
<ProjectReference Include="..\..\src\ServiceStack.Memory\ServiceStack.Memory.csproj" />
5857
<PackageReference Include="System.Collections.Specialized" Version="4.*" />
5958
<PackageReference Include="System.Collections.NonGeneric" Version="4.*" />
6059
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.*" />

0 commit comments

Comments
 (0)