Skip to content

Commit

Permalink
Merge pull request dotnet#11603 from JeremyKuhne/sanitizeSpwc
Browse files Browse the repository at this point in the history
Namespace cleanup for System.Private.Windows.Core
  • Loading branch information
JeremyKuhne authored Jun 27, 2024
2 parents df56dcc + d6d7175 commit e1cd1ba
Show file tree
Hide file tree
Showing 115 changed files with 134 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Windows.Forms.BinaryFormat;
using System.Private.Windows.Core.BinaryFormat;

namespace System.IO;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Array information structure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections;
using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Base class for array records.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal static class ArrayRecordExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Single dimensional array of objects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Single dimensional array of a primitive type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Collections;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal sealed partial class ArraySingleString
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Single dimensional array of strings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Array of objects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// <see cref="BinaryArray"/> of objects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// <see cref="BinaryArray"/> of primitive values.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Binary array type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Writer that writes specific types in binary format without using the BinaryFormatter.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal sealed partial class BinaryFormattedObject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal sealed partial class BinaryFormattedObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

#pragma warning disable SYSLIB0050 // Type or member is obsolete

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal sealed partial class BinaryFormattedObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma warning disable SYSLIB0050 // Type or member is obsolete

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal sealed partial class BinaryFormattedObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Runtime.Serialization;
using System.Text;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Object model for the binary format put out by BinaryFormatter. It parses and creates a model but does not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Drawing;
using System.Runtime.CompilerServices;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal static class BinaryFormattedObjectExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Library full name information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// String record.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Identifies the remoting type of a class member or array item.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Class info.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Base class for class records.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.CompilerServices;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

internal static class ClassRecordExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Identifies a class by it's name and library id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Class information that references another class record's metadata.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Class information with the source library.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat;
namespace System.Private.Windows.Core.BinaryFormat;

/// <summary>
/// Class information with type info and the source library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

internal sealed class ArrayRecordDeserializer : ObjectRecordDeserializer
{
Expand All @@ -14,7 +14,7 @@ internal sealed class ArrayRecordDeserializer : ObjectRecordDeserializer
private int _index;
private bool _hasFixups;

[RequiresUnreferencedCode("Calls System.Windows.Forms.BinaryFormat.BinaryFormattedObject.TypeResolver.GetType(String, Id)")]
[RequiresUnreferencedCode("Calls System.Private.Windows.Core.BinaryFormat.BinaryFormattedObject.TypeResolver.GetType(String, Id)")]
internal ArrayRecordDeserializer(ArrayRecord<object?> arrayRecord, IDeserializer deserializer)
: base(arrayRecord, deserializer)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

internal sealed class ArrayUpdater : ValueUpdater
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

#pragma warning disable SYSLIB0050 // Type or member is obsolete

Expand Down Expand Up @@ -33,7 +33,7 @@ private protected ClassRecordDeserializer(
_onlyAllowPrimitives = @object is IObjectReference;
}

[RequiresUnreferencedCode("Calls System.Windows.Forms.BinaryFormat.BinaryFormattedObject.TypeResolver.GetType(String, Id)")]
[RequiresUnreferencedCode("Calls System.Private.Windows.Core.BinaryFormat.BinaryFormattedObject.TypeResolver.GetType(String, Id)")]
internal static ObjectRecordDeserializer Create(ClassRecord classRecord, IDeserializer deserializer)
{
Type type = deserializer.TypeResolver.GetType(classRecord.Name, classRecord.LibraryId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

#pragma warning disable SYSLIB0050 // Type or member is obsolete

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

#pragma warning disable SYSLIB0050 // Type or member is obsolete

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

internal sealed partial class Deserializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

#pragma warning disable SYSLIB0050 // Type or member is obsolete

Expand Down Expand Up @@ -101,7 +101,7 @@ private Deserializer(
/// <summary>
/// Deserializes the object graph for the given <paramref name="recordMap"/> and <paramref name="rootId"/>.
/// </summary>
[RequiresUnreferencedCode("Calls System.Windows.Forms.BinaryFormat.Deserializer.Deserializer.Deserialize()")]
[RequiresUnreferencedCode("Calls System.Private.Windows.Core.BinaryFormat.Deserializer.Deserializer.Deserialize()")]
internal static object Deserialize(
Id rootId,
IReadOnlyRecordMap recordMap,
Expand All @@ -112,7 +112,7 @@ internal static object Deserialize(
return deserializer.Deserialize();
}

[RequiresUnreferencedCode("Calls System.Windows.Forms.BinaryFormat.Deserializer.Deserializer.DeserializeRoot(Id)")]
[RequiresUnreferencedCode("Calls System.Private.Windows.Core.BinaryFormat.Deserializer.Deserializer.DeserializeRoot(Id)")]
private object Deserialize()
{
DeserializeRoot(_rootId);
Expand Down Expand Up @@ -191,7 +191,7 @@ private void DeserializeRoot(Id rootId)
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[RequiresUnreferencedCode("Calls System.Windows.Forms.BinaryFormat.Deserializer.ObjectRecordParser.Create(Id, IRecord, IDeserializer)")]
[RequiresUnreferencedCode("Calls System.Private.Windows.Core.BinaryFormat.Deserializer.ObjectRecordParser.Create(Id, IRecord, IDeserializer)")]
object DeserializeNew(Id id)
{
// Strings, string arrays, and primitive arrays can be completed without creating a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Reflection;

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

internal sealed class FieldValueUpdater : ValueUpdater
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace System.Windows.Forms.BinaryFormat.Deserializer;
namespace System.Private.Windows.Core.BinaryFormat.Deserializer;

#pragma warning disable SYSLIB0050 // Type or member is obsolete

Expand Down
Loading

0 comments on commit e1cd1ba

Please sign in to comment.