Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Add missing TypeForwardedFromAttribute to System.Drawing serializable…
Browse files Browse the repository at this point in the history
… types (#33499)
  • Loading branch information
safern authored and stephentoub committed Nov 15, 2018
1 parent 3b358e2 commit 711a104
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/System.Drawing.Common/src/System/Drawing/Bitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace System.Drawing
{
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public sealed partial class Bitmap : Image
{
private static Color s_defaultTransparentColor = Color.LightGray;
Expand Down
1 change: 1 addition & 0 deletions src/System.Drawing.Common/src/System/Drawing/Font.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace System.Drawing
[TypeConverter("System.Drawing.FontConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
#endif
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public sealed partial class Font : MarshalByRefObject, ICloneable, IDisposable, ISerializable
{
private IntPtr _nativeFont;
Expand Down
1 change: 1 addition & 0 deletions src/System.Drawing.Common/src/System/Drawing/Icon.Unix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ namespace System.Drawing
#endif
#endif
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public sealed partial class Icon : MarshalByRefObject, ISerializable, ICloneable, IDisposable
{
// The PNG signature is specified at http://www.w3.org/TR/PNG/#5PNG-file-signature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace System.Drawing
{
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
#if netcoreapp
[TypeConverter("System.Drawing.IconConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
#endif
Expand Down
1 change: 1 addition & 0 deletions src/System.Drawing.Common/src/System/Drawing/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace System.Drawing
/// </summary>
[ImmutableObject(true)]
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
#if netcoreapp
[TypeConverter("System.Drawing.ImageConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace System.Drawing.Imaging
[Editor ("System.Drawing.Design.MetafileEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
#endif
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public sealed class Metafile : Image
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace System.Drawing.Imaging
/// can be recorded and played back.
/// </summary>
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public sealed partial class Metafile : Image
{
// GDI+ doesn't handle filenames over MAX_PATH very well
Expand Down

Large diffs are not rendered by default.

0 comments on commit 711a104

Please sign in to comment.