Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1322449
Fix Private.Xml solution broken by https://github.com/dotnet/runtime/…
StephenMolloy Jun 28, 2022
fe3c017
Align DCS with 4.8 implementation - minus schema import/export.
StephenMolloy Jun 29, 2022
335adfe
External DCS Schema support groundwork. Before DC-tree work and other…
StephenMolloy Jul 3, 2022
6dfd3c4
Added public APIs, but not the DataContract tree yet.
StephenMolloy Jul 6, 2022
71d4ab4
All APIs in.
StephenMolloy Jul 7, 2022
4eb08fb
Cleanup.
StephenMolloy Jul 7, 2022
ec2518d
Addressed some nits and PR feedback on API.
StephenMolloy Jul 8, 2022
ec64156
Merge branch 'main' into dcs-alignment-with-schema-support
StephenMolloy Jul 8, 2022
1183287
API nit, more PR feedback.
StephenMolloy Jul 10, 2022
92b1d63
Fix HasRoot hiding issue.
StephenMolloy Jul 11, 2022
79da1a7
Add basic schema tests. Fix DataMember bug.
StephenMolloy Jul 12, 2022
9a13158
Add /// comments for new schema project.
StephenMolloy Jul 12, 2022
3b376ab
Fixing bad format in xml comment.
StephenMolloy Jul 12, 2022
2127ba8
Skip import test on Wasm.
StephenMolloy Jul 12, 2022
4c3417c
Obsolete old half-coded schema exporter.
StephenMolloy Jul 12, 2022
54b6b39
Add obsolete attribute in ref project as well.
StephenMolloy Jul 12, 2022
7308470
Removing obsolete for now, since it appears Syndication depends on ol…
StephenMolloy Jul 13, 2022
6be7bbc
Fix the DCJS ref project.
StephenMolloy Jul 13, 2022
446c993
API cleanup.
StephenMolloy Jul 14, 2022
8157957
Project file cleanup
StephenMolloy Jul 14, 2022
0956064
Merge branch 'main' into dcs-alignment-with-schema-support
ViktorHofer Jul 14, 2022
f1414b8
Fix mono issue with reflection access to non-public private fields.
StephenMolloy Jul 15, 2022
36267a6
Merge branch 'dcs-alignment-with-schema-support' of https://github.co…
StephenMolloy Jul 15, 2022
bf6d5dd
Addressing feedback from API review.
StephenMolloy Jul 29, 2022
df5f444
Merge branch 'main' into dcs-alignment-with-schema-support
StephenMolloy Jul 29, 2022
e868642
Port NetFx Export/Import test suites to Serializer test projects.
StephenMolloy Aug 2, 2022
24ca75c
Fix bugs found by newly ported tests.
StephenMolloy Aug 2, 2022
6b65e43
Merge branch 'dcs-alignment-with-schema-support' of https://github.co…
StephenMolloy Aug 2, 2022
ded55f6
Account for different newline sizes on different platforms.
StephenMolloy Aug 3, 2022
7462bea
Skip flaky test on wasm for now.
StephenMolloy Aug 3, 2022
7bbdbee
Non-draft PR feedback.
StephenMolloy Aug 11, 2022
be324a7
Gentle nudge for Azure pipeline, which seems to have gotten stuck.
StephenMolloy Aug 11, 2022
08d419c
Change DC.Members API. Drop KVP shennanigans.
StephenMolloy Aug 12, 2022
4f555bc
More PR feedback.
StephenMolloy Aug 12, 2022
80fd11b
Nudge Azure pipelines again. :(
StephenMolloy Aug 12, 2022
f8ebd1a
nudge
StephenMolloy Aug 12, 2022
01517c7
nudge again.
StephenMolloy Aug 13, 2022
b7100af
One more nudge.
StephenMolloy Aug 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added public APIs, but not the DataContract tree yet.
  • Loading branch information
StephenMolloy committed Jul 6, 2022
commit 6dfd3c46b52e5da17ad89555bae376a9be3adee1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<Compile Include="$(RuntimeSerializationSources)\ReflectionXmlFormatWriter.cs" />
<Compile Include="$(RuntimeSerializationSources)\SchemaExporter.cs" />
<Compile Include="$(RuntimeSerializationSources)\SchemaHelper.cs" />
<Compile Include="$(RuntimeSerializationSources)\SchemaImporter.cs" />
<Compile Include="$(RuntimeSerializationSources)\ScopedKnownTypes.cs" />
<Compile Include="$(RuntimeSerializationSources)\SerializationOption.cs" />
<Compile Include="$(RuntimeSerializationSources)\SpecialTypeDataContract.cs" />
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Xml;
using System.Reflection;
using System.Reflection.Emit;
using System.IO;
using System.Security;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization.Json;

namespace System.Runtime.Serialization
{
Expand Down Expand Up @@ -176,15 +171,15 @@ internal MethodInfo CurrentMethod

internal ArgBuilder GetArg(int index)
{
return (ArgBuilder)_argList[index];
return _argList[index];
}

internal static Type GetVariableType(object var)
{
if (var is ArgBuilder)
return ((ArgBuilder)var).ArgType;
else if (var is LocalBuilder)
return ((LocalBuilder)var).LocalType;
if (var is ArgBuilder argBuilder)
return argBuilder.ArgType;
else if (var is LocalBuilder localBuilder)
return localBuilder.LocalType;
else
return var.GetType();
}
Expand Down Expand Up @@ -267,8 +262,7 @@ internal void InternalBreakFor(object userForState, OpCode branchInstruction)
{
foreach (object block in _blockStack)
{
ForState? forState = block as ForState;
if (forState != null && (object)forState == userForState)
if (block == userForState && block is ForState forState)
{
if (!forState.RequiresEndLabel)
{
Expand Down Expand Up @@ -680,20 +674,20 @@ internal void Load(object? obj)
{
_ilGen.Emit(OpCodes.Ldnull);
}
else if (obj is ArgBuilder)
Ldarg((ArgBuilder)obj);
else if (obj is LocalBuilder)
Ldloc((LocalBuilder)obj);
else if (obj is ArgBuilder argBuilder)
Ldarg(argBuilder);
else if (obj is LocalBuilder localBuilder)
Ldloc(localBuilder);
else
Ldc(obj);
}

internal void Store(object var)
{
if (var is ArgBuilder)
Starg((ArgBuilder)var);
else if (var is LocalBuilder)
Stloc((LocalBuilder)var);
if (var is ArgBuilder argBuilder)
Starg(argBuilder);
else if (var is LocalBuilder localBuilder)
Stloc(localBuilder);
else
{
DiagnosticUtility.DebugAssert("Data can only be stored into ArgBuilder or LocalBuilder.");
Expand All @@ -711,10 +705,10 @@ internal void Dec(object var)

internal void LoadAddress(object obj)
{
if (obj is ArgBuilder)
LdargAddress((ArgBuilder)obj);
else if (obj is LocalBuilder)
LdlocAddress((LocalBuilder)obj);
if (obj is ArgBuilder argBuilder)
LdargAddress(argBuilder);
else if (obj is LocalBuilder localBuilder)
LdlocAddress(localBuilder);
else
Load(obj);
}
Expand Down Expand Up @@ -802,9 +796,9 @@ internal void Ldtoken(Type t)
internal void Ldc(object o)
{
Type valueType = o.GetType();
if (o is Type)
if (o is Type t)
{
Ldtoken((Type)o);
Ldtoken(t);
Call(GetTypeFromHandle);
}
else if (valueType.IsEnum)
Expand Down Expand Up @@ -1338,8 +1332,8 @@ internal sealed class ArgBuilder
internal Type ArgType;
internal ArgBuilder(int index, Type argType)
{
this.Index = index;
this.ArgType = argType;
Index = index;
ArgType = argType;
}
}

Expand Down
Loading