Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
AqlaSolutions committed May 4, 2016
1 parent 23ec0a2 commit 58e1655
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Nuget/aqlaserializer.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>aqlaserializer</id>
<version>2.0.0.96</version>
<version>2.0.0.186</version>
<authors>Vladyslav Taranov</authors>
<copyright>Vladyslav Taranov 2016, fork source from Marc Gravell 2016</copyright>
<owners>Vladyslav Taranov</owners>
Expand Down
4 changes: 2 additions & 2 deletions precompile/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.96")]
[assembly: AssemblyFileVersion("2.0.0.96")]
[assembly: AssemblyVersion("2.0.0.186")]
[assembly: AssemblyFileVersion("2.0.0.186")]
4 changes: 2 additions & 2 deletions protobuf-net.Extensions/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.96")]
[assembly: AssemblyVersion("2.0.0.186")]
#if !CF
[assembly: AssemblyFileVersion("2.0.0.96")]
[assembly: AssemblyFileVersion("2.0.0.186")]
#endif
[assembly: CLSCompliant(true)]
2 changes: 1 addition & 1 deletion protobuf-net.unittest/Aqla/LegacyTupleMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ElementDef
public class Container
{
[ProtoMember(1)]
public Dictionary<string, List<Element>> Foo { get; set; }
public Dictionary<string, List<LegacyTupleMode.Element>> Foo { get; set; }

[ProtoMember(2)]
public Dictionary<Element, ElementDef> Bar { get; set; }
Expand Down
9 changes: 9 additions & 0 deletions protobuf-net/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ public static bool IsGenericTypeDefinition(Type type)
#endif
}

public static bool IsGenericType(Type type)
{
#if WINRT
return type.GetTypeInfo().IsGenericType;
#else
return type.IsGenericType;
#endif
}

public static Type[] GetTypes(Assembly assembly)
{
#if WINRT
Expand Down
2 changes: 1 addition & 1 deletion protobuf-net/Meta/RuntimeTypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ internal int FindOrAddAuto(Type type, bool demand, bool addWithContractOnly, boo
{ // otherwise, check if it is a contract
MetaType.AttributeFamily family = _autoAddStrategy.GetContractFamily(type);

if (family == MetaType.AttributeFamily.AutoTuple && type.IsGenericType)
if (family == MetaType.AttributeFamily.AutoTuple && Helpers.IsGenericType(type))
{
// always add safe tuples
Type def = type.GetGenericTypeDefinition();
Expand Down
2 changes: 1 addition & 1 deletion protobuf-net/Meta/TypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal TypeInfo MapType(TypeInfo type)
/// </summary>
public bool AllowReferenceVersioningSeeking { get; set; } = true;

internal const int DefaultArrayLengthReadLimit = 100000;
internal const int DefaultArrayLengthReadLimit = 500000;

/// <summary>
/// Max count for list for <see cref="AllowReferenceVersioningSeeking"/>
Expand Down
16 changes: 13 additions & 3 deletions protobuf-net/NetObjectHelpers.Read.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
using System;
#if FEAT_COMPILER
using AqlaSerializer.Compiler;
#endif
using System.Diagnostics;
using AqlaSerializer.Meta;
#if FEAT_IKVM
using Type = IKVM.Reflection.Type;
using IKVM.Reflection;
#else
using System.Reflection;

#endif

namespace AqlaSerializer
{
Expand Down Expand Up @@ -177,17 +188,16 @@ public static ReadReturnValue ReadNetObject_Start(ref object value, ProtoReader
return r;
#endif
}

#if !FEAT_IKVM
static void ReadNewType(ProtoReader source, out Type type, out int typeKey)
{

string typeName = source.ReadString();
type = source.DeserializeType(typeName);
if (type == null)
throw new ProtoException("Unable to resolve type: " + typeName + " (you can use the TypeModel.DynamicTypeFormatting event to provide a custom mapping)");
typeKey = source.GetTypeKey(ref type);
}

#endif
private const int
FieldExistingObjectKey = 1,
FieldNewObjectKey = 2,
Expand Down
11 changes: 11 additions & 0 deletions protobuf-net/NetObjectHelpers.Write.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
using System;
#if FEAT_COMPILER
using AqlaSerializer.Compiler;
#endif
using System.Diagnostics;
using AqlaSerializer.Meta;
#if FEAT_IKVM
using Type = IKVM.Reflection.Type;
using IKVM.Reflection;
#else
using System.Reflection;

#endif

namespace AqlaSerializer
{
Expand Down
4 changes: 2 additions & 2 deletions protobuf-net/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.96")]
[assembly: AssemblyVersion("2.0.0.186")]
#if !CF
[assembly: AssemblyFileVersion("2.0.0.96")]
[assembly: AssemblyFileVersion("2.0.0.186")]
#endif
#if !FX11
[assembly: InternalsVisibleTo("aqlaserializer.unittest, PublicKey=002400000480000094000000060200000024000052534131000400000100010091B11AB23561C227F083424C0162A38DA330B724B6E96C1BE6C5989BFDD5C1BA3E555D8F105DD352C2623FE6AF90F4FA3173C6120DD567283434513DA579728230E1697A156770A81B7FBF5535ECDB96D2737E74181A4D980647AE33CDFB6E0C1FF63065AE8E33BB27374090393685FF265563655DE4829B0E5C996B1CF9A3E3")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ public void EmitRead(CompilerContext ctx, Local valueFrom)
var shouldRead = readReturnValue.AsOperand.Field(nameof(NetObjectHelpers.ReadReturnValue.ShouldRead)).SetNotLeaked();
var isLateReference = readReturnValue.AsOperand.Field(nameof(NetObjectHelpers.ReadReturnValue.IsLateReference)).SetNotLeaked();
var isDynamic = readReturnValue.AsOperand.Field(nameof(NetObjectHelpers.ReadReturnValue.IsDynamic)).SetNotLeaked();
var token = readReturnValue.AsOperand.Field(nameof(NetObjectHelpers.ReadReturnValue.Token)).SetNotLeaked();


g.Assign(options, _options);
if (!RequiresOldValue)
g.Assign(inputValueBoxed, null);
Expand Down

0 comments on commit 58e1655

Please sign in to comment.