Skip to content

Commit b6dbc16

Browse files
committed
Experimental Runtime Codegen
Warning: Hax. Hax upon Hax upon Hax. This shit be ugly, yo.
1 parent 12b395a commit b6dbc16

File tree

147 files changed

+6428
-4295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+6428
-4295
lines changed

NuGet/servicestack.text.nuspec

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
<?xml version="1.0"?>
2-
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3-
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4-
<id>ServiceStack.Text</id>
5-
<version>3.7.9</version>
6-
<authors>Demis Bellot</authors>
7-
<owners>Demis Bellot</owners>
8-
<summary>.NET's fastest JSON, JSV and CSV Text Serializers (3x faster than JSON.NET)</summary>
9-
<description>
10-
.NET's fastest JSON, JSV and CSV Text Serializers (3x faster than JSON.NET). Fast, Light, Resilient.
11-
</description>
12-
<projectUrl>https://github.com/ServiceStack/ServiceStack.Text</projectUrl>
13-
<licenseUrl>https://github.com/ServiceStack/ServiceStack.Text/blob/master/LICENSE</licenseUrl>
14-
<iconUrl>http://www.servicestack.net/logo-100x100.png</iconUrl>
15-
<tags>JSON Text Serializer CSV JSV Dump PrettyPrint Fast</tags>
16-
<language>en-US</language>
17-
<copyright>ServiceStack 2012 and contributors</copyright>
18-
</metadata>
19-
</package>
20-
1+
<?xml version="1.0"?>
2+
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3+
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4+
<id>StrobelStack.Text</id>
5+
<version>3.7.9</version>
6+
<authors>Demis Bellot</authors>
7+
<owners>Demis Bellot</owners>
8+
<summary>.NET's fastest JSON, JSV and CSV Text Serializers (3x faster than JSON.NET)</summary>
9+
<description>
10+
.NET's fastest JSON, JSV and CSV Text Serializers (3x faster than JSON.NET). Fast, Light, Resilient.
11+
</description>
12+
<projectUrl>https://github.com/ServiceStack/StrobelStack.Text</projectUrl>
13+
<licenseUrl>https://github.com/ServiceStack/StrobelStack.Text/blob/master/LICENSE</licenseUrl>
14+
<iconUrl>http://www.servicestack.net/logo-100x100.png</iconUrl>
15+
<tags>JSON Text Serializer CSV JSV Dump PrettyPrint Fast</tags>
16+
<language>en-US</language>
17+
<copyright>ServiceStack 2012 and contributors</copyright>
18+
</metadata>
19+
</package>
20+

build/NuGetPack.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nuget pack ..\NuGet\servicestack.text.nuspec
1+
nuget pack ..\NuGet\StrobelStack.Text.nuspec

build/build.bat

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
2-
REM SET BUILD=Debug
3-
SET BUILD=Release
4-
5-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\release\latest\
6-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\release\latest\ServiceStack.Text\
7-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\lib
8-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Contrib\lib
9-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Redis\lib
10-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Examples\lib
11-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.RedisWebServices\lib
12-
13-
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\NuGet\lib\net35
1+
2+
REM SET BUILD=Debug
3+
SET BUILD=Release
4+
5+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\release\latest\
6+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\release\latest\StrobelStack.Text\
7+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\lib
8+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Contrib\lib
9+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Redis\lib
10+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Examples\lib
11+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.RedisWebServices\lib
12+
13+
COPY ..\src\StrobelStack.Text\bin\%BUILD%\*.* ..\NuGet\lib\net35

src/ServiceStack.Text/AssemblyUtils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#endif
88
using ServiceStack.Common.Support;
99

10-
namespace ServiceStack.Text
10+
namespace StrobelStack.Text
1111
{
1212
/// <summary>
1313
/// Utils to load types

src/ServiceStack.Text/Common/DateTimeSerializer.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -13,9 +13,9 @@
1313
using System;
1414
using System.Globalization;
1515
using System.Xml;
16-
using ServiceStack.Text.Json;
16+
using StrobelStack.Text.Json;
1717

18-
namespace ServiceStack.Text.Common
18+
namespace StrobelStack.Text.Common
1919
{
2020
public static class DateTimeSerializer
2121
{

src/ServiceStack.Text/Common/DeserializeArray.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -16,7 +16,7 @@
1616
using System.Reflection;
1717
using System.Threading;
1818

19-
namespace ServiceStack.Text.Common
19+
namespace StrobelStack.Text.Common
2020
{
2121
internal static class DeserializeArrayWithElements<TSerializer>
2222
where TSerializer : ITypeSerializer

src/ServiceStack.Text/Common/DeserializeBuiltin.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -13,7 +13,7 @@
1313
using System;
1414
using System.Globalization;
1515

16-
namespace ServiceStack.Text.Common
16+
namespace StrobelStack.Text.Common
1717
{
1818
public static class DeserializeBuiltin<T>
1919
{

src/ServiceStack.Text/Common/DeserializeCollection.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -15,10 +15,10 @@
1515
using System.Reflection;
1616
using System.Threading;
1717
#if WINDOWS_PHONE
18-
using ServiceStack.Text.WP;
18+
using StrobelStack.Text.WP;
1919
#endif
2020

21-
namespace ServiceStack.Text.Common
21+
namespace StrobelStack.Text.Common
2222
{
2323
internal static class DeserializeCollection<TSerializer>
2424
where TSerializer : ITypeSerializer

src/ServiceStack.Text/Common/DeserializeDictionary.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -16,9 +16,9 @@
1616
using System.Runtime.Serialization;
1717
using System.Text;
1818
using System.Threading;
19-
using ServiceStack.Text.Json;
19+
using StrobelStack.Text.Json;
2020

21-
namespace ServiceStack.Text.Common
21+
namespace StrobelStack.Text.Common
2222
{
2323
internal static class DeserializeDictionary<TSerializer>
2424
where TSerializer : ITypeSerializer

src/ServiceStack.Text/Common/DeserializeListWithElements.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -16,7 +16,7 @@
1616
using System.Reflection;
1717
using System.Threading;
1818

19-
namespace ServiceStack.Text.Common
19+
namespace StrobelStack.Text.Common
2020
{
2121
internal static class DeserializeListWithElements<TSerializer>
2222
where TSerializer : ITypeSerializer

src/ServiceStack.Text/Common/DeserializeSpecializedCollections.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Linq;
66
using System.Reflection;
77

8-
namespace ServiceStack.Text.Common
8+
namespace StrobelStack.Text.Common
99
{
1010
internal static class DeserializeSpecializedCollections<T, TSerializer>
1111
where TSerializer : ITypeSerializer

src/ServiceStack.Text/Common/DeserializeType.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -20,7 +20,7 @@
2020
using System.Reflection;
2121
using System.Runtime.Serialization;
2222

23-
namespace ServiceStack.Text.Common
23+
namespace StrobelStack.Text.Common
2424
{
2525
internal static class DeserializeType<TSerializer>
2626
where TSerializer : ITypeSerializer

src/ServiceStack.Text/Common/DeserializeTypeRef.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Runtime.Serialization;
44

5-
namespace ServiceStack.Text.Common
5+
namespace StrobelStack.Text.Common
66
{
77
internal static class DeserializeTypeRef
88
{

src/ServiceStack.Text/Common/DeserializeTypeRefJson.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using System.Collections.Generic;
3-
using ServiceStack.Text.Json;
3+
using StrobelStack.Text.Json;
44

5-
namespace ServiceStack.Text.Common
5+
namespace StrobelStack.Text.Common
66
{
77
internal static class DeserializeTypeRefJson
88
{

src/ServiceStack.Text/Common/DeserializeTypeRefJsv.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Runtime.Serialization;
4-
using ServiceStack.Text.Jsv;
4+
using StrobelStack.Text.Jsv;
55

6-
namespace ServiceStack.Text.Common
6+
namespace StrobelStack.Text.Common
77
{
88
internal static class DeserializeTypeRefJsv
99
{

src/ServiceStack.Text/Common/DeserializeTypeUtils.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -13,7 +13,7 @@
1313
using System;
1414
using System.Reflection;
1515

16-
namespace ServiceStack.Text.Common
16+
namespace StrobelStack.Text.Common
1717
{
1818
public class DeserializeTypeUtils
1919
{

src/ServiceStack.Text/Common/ITypeSerializer.cs

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
using System;
22
using System.IO;
3-
using ServiceStack.Text.Json;
3+
using StrobelStack.Text.Json;
44

5-
namespace ServiceStack.Text.Common
5+
namespace StrobelStack.Text.Common
66
{
77
internal interface ITypeSerializer
88
{
99
string TypeAttrInObject { get; }
1010

11-
WriteObjectDelegate GetWriteFn<T>();
11+
WriteValueDelegate<T> GetWriteFn<T>();
1212
WriteObjectDelegate GetWriteFn(Type type);
1313
TypeInfo GetTypeInfo(Type type);
1414

15+
void WriteTypeInfo(TextWriter writer, object value);
16+
1517
void WriteRawString(TextWriter writer, string value);
1618
void WritePropertyName(TextWriter writer, string value);
1719

18-
void WriteBuiltIn(TextWriter writer, object value);
20+
void WriteBuiltIn<T>(TextWriter writer, T value);
1921
void WriteObjectString(TextWriter writer, object value);
2022
void WriteException(TextWriter writer, object value);
2123
void WriteString(TextWriter writer, string value);
@@ -32,7 +34,7 @@ internal interface ITypeSerializer
3234
void WriteByte(TextWriter writer, object byteValue);
3335
void WriteInt16(TextWriter writer, object intValue);
3436
void WriteUInt16(TextWriter writer, object intValue);
35-
void WriteInt32(TextWriter writer, object intValue);
37+
void WriteInt32(TextWriter writer, int? intValue);
3638
void WriteUInt32(TextWriter writer, object uintValue);
3739
void WriteInt64(TextWriter writer, object longValue);
3840
void WriteUInt64(TextWriter writer, object ulongValue);

src/ServiceStack.Text/Common/JsDelegates.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// http://code.google.com/p/servicestack/wiki/TypeSerializer
3-
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
3+
// StrobelStack.Text: .NET C# POCO Type Text Serializer.
44
//
55
// Authors:
66
// Demis Bellot ([email protected])
@@ -14,7 +14,7 @@
1414
using System.Collections.Generic;
1515
using System.IO;
1616

17-
namespace ServiceStack.Text.Common
17+
namespace StrobelStack.Text.Common
1818
{
1919
internal delegate void WriteListDelegate(TextWriter writer, object oList, WriteObjectDelegate toStringFn);
2020

@@ -26,6 +26,8 @@ namespace ServiceStack.Text.Common
2626

2727
internal delegate void WriteObjectDelegate(TextWriter writer, object obj);
2828

29+
internal delegate void WriteValueDelegate<in T>(TextWriter writer, T obj);
30+
2931
public delegate void SetPropertyDelegate(object instance, object propertyValue);
3032

3133
public delegate object ParseStringDelegate(string stringValue);

src/ServiceStack.Text/Common/JsReader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections;
33
using System.Collections.Generic;
44

5-
namespace ServiceStack.Text.Common
5+
namespace StrobelStack.Text.Common
66
{
77
internal class JsReader<TSerializer>
88
where TSerializer : ITypeSerializer

src/ServiceStack.Text/Common/JsState.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace ServiceStack.Text.Common
3+
namespace StrobelStack.Text.Common
44
{
55
internal static class JsState
66
{
@@ -10,5 +10,7 @@ internal static class JsState
1010
[ThreadStatic] internal static bool IsWritingValue = false;
1111

1212
[ThreadStatic] internal static bool IsWritingDynamic = false;
13+
14+
[ThreadStatic] internal static bool IsJson = false;
1315
}
1416
}

0 commit comments

Comments
 (0)