Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Carlier <frederik.carlier@quamotion.mobi>2017-03-17 02:10:44 +0300
committerMarek Safar <marek.safar@gmail.com>2017-03-17 02:10:44 +0300
commit6447228e30ad356c1ada9f702490a817abed9324 (patch)
tree5dd1515163e5befdbb44c7991fe551ea78a5d777 /mcs/class/System.Drawing
parentb8285f3c9951354be07f693dd5996790d5764e3a (diff)
Remove CAS attributes from System.Drawing (#4544)
Diffstat (limited to 'mcs/class/System.Drawing')
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs4
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Bitmap.cs4
-rw-r--r--mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Font.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Graphics.cs6
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Icon.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Region.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs1
-rw-r--r--mcs/class/System.Drawing/System.Drawing/macFunctions.cs1
16 files changed, 0 insertions, 43 deletions
diff --git a/mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs b/mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs
index 259b101978d..7a0abfa2eea 100644
--- a/mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs
@@ -33,11 +33,9 @@
//
using System.Collections;
-using System.Security.Permissions;
namespace System.Drawing.Design
{
- [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
public sealed class CategoryNameCollection : ReadOnlyCollectionBase
{
diff --git a/mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs
index 1b7ba48f874..837f39bf187 100644
--- a/mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs
@@ -30,12 +30,9 @@
//
using System.ComponentModel;
-using System.Security.Permissions;
namespace System.Drawing.Design
{
- [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
- [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class PaintValueEventArgs : EventArgs
{
private ITypeDescriptorContext context;
diff --git a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs b/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs
index ad6676f5371..422728a1434 100644
--- a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs
@@ -32,12 +32,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Security.Permissions;
-
namespace System.Drawing.Design
{
- [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
- [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class PropertyValueUIItem
{
diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs
index 5d0684bdf1e..f7969b97249 100644
--- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs
@@ -31,12 +31,9 @@
//
using System.ComponentModel;
-using System.Security.Permissions;
namespace System.Drawing.Design
{
- [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
- [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class ToolboxComponentsCreatedEventArgs : EventArgs
{
private IComponent[] components;
diff --git a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs b/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs
index 56ce1912fec..31f736a47bb 100644
--- a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs
@@ -30,13 +30,10 @@
//
using System.ComponentModel;
-using System.Security.Permissions;
using System.Collections;
namespace System.Drawing.Design
{
- [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
- [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class UITypeEditor {
static UITypeEditor ()
diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs b/mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs
index 7fd1df97572..02a3f27c9a5 100644
--- a/mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs
@@ -31,7 +31,6 @@
//
using System.Runtime.Serialization;
-using System.Security.Permissions;
namespace System.Drawing.Printing {
@@ -50,7 +49,6 @@ namespace System.Drawing.Printing {
{
}
- [SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData (SerializationInfo info, StreamingContext context)
{
if (info == null)
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs b/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs
index 6da3937e740..0b731a01f2e 100644
--- a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs
@@ -30,7 +30,6 @@
//
using System.IO;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
namespace System.Drawing.Text {
@@ -62,7 +61,6 @@ namespace System.Drawing.Text {
GDIPlus.CheckStatus (status);
}
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public void AddMemoryFont (IntPtr memory, int length)
{
// note: MS throw FileNotFoundException if something is bad with the data (except for a null pointer)
diff --git a/mcs/class/System.Drawing/System.Drawing/Bitmap.cs b/mcs/class/System.Drawing/System.Drawing/Bitmap.cs
index 8acb49bb0fc..ffa825c5f27 100644
--- a/mcs/class/System.Drawing/System.Drawing/Bitmap.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Bitmap.cs
@@ -40,7 +40,6 @@ using System.Drawing.Imaging;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
using System.ComponentModel;
-using System.Security.Permissions;
namespace System.Drawing
{
@@ -228,14 +227,12 @@ namespace System.Drawing
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public IntPtr GetHbitmap ()
{
return GetHbitmap(Color.Gray);
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public IntPtr GetHbitmap (Color background)
{
IntPtr HandleBmp;
@@ -247,7 +244,6 @@ namespace System.Drawing
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public IntPtr GetHicon ()
{
IntPtr HandleIcon;
diff --git a/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs b/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
index b2529ffe466..6d874797e07 100644
--- a/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
+++ b/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
@@ -30,7 +30,6 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
-using System.Security.Permissions;
namespace System.Drawing
{
@@ -106,7 +105,6 @@ namespace System.Drawing
}
[MonoTODO ("The targetDC parameter has no equivalent in libgdiplus.")]
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public void Render (IntPtr targetDC)
{
throw new NotImplementedException ();
diff --git a/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs b/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
index 92181609fab..721e00a98bf 100644
--- a/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
+++ b/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
@@ -30,7 +30,6 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
-using System.Security.Permissions;
namespace System.Drawing
{
@@ -54,7 +53,6 @@ namespace System.Drawing
}
[MonoTODO ("The targetDC parameter has no equivalent in libgdiplus.")]
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public BufferedGraphics Allocate (IntPtr targetDC, Rectangle targetRectangle)
{
throw new NotImplementedException ();
diff --git a/mcs/class/System.Drawing/System.Drawing/Font.cs b/mcs/class/System.Drawing/System.Drawing/Font.cs
index d542b642c43..34117a2e193 100644
--- a/mcs/class/System.Drawing/System.Drawing/Font.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Font.cs
@@ -33,7 +33,6 @@
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
-using System.Security.Permissions;
using System.ComponentModel;
namespace System.Drawing
@@ -591,7 +590,6 @@ namespace System.Drawing
}
}
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public void ToLogFont (object logFont)
{
if (GDIPlus.RunningOnUnix ()) {
@@ -616,7 +614,6 @@ namespace System.Drawing
}
}
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public void ToLogFont (object logFont, Graphics graphics)
{
if (graphics == null)
diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.cs
index f983b74f6b6..9c002db4162 100644
--- a/mcs/class/System.Drawing/System.Drawing/Graphics.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Graphics.cs
@@ -35,7 +35,6 @@ using System.Drawing.Imaging;
using System.Drawing.Text;
using System.ComponentModel;
using System.Runtime.InteropServices;
-using System.Security.Permissions;
using System.Text;
namespace System.Drawing
@@ -1692,7 +1691,6 @@ namespace System.Drawing
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public static Graphics FromHdcInternal (IntPtr hdc)
{
GDIPlus.Display = hdc;
@@ -1744,7 +1742,6 @@ namespace System.Drawing
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public static Graphics FromHwndInternal (IntPtr hwnd)
{
return FromHwnd (hwnd);
@@ -2015,13 +2012,11 @@ namespace System.Drawing
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public void ReleaseHdc (IntPtr hdc)
{
ReleaseHdcInternal (hdc);
}
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public void ReleaseHdc ()
{
ReleaseHdcInternal (deviceContextHdc);
@@ -2029,7 +2024,6 @@ namespace System.Drawing
[MonoLimitation ("Can only be used when hdc was provided by Graphics.GetHdc() method")]
[EditorBrowsable (EditorBrowsableState.Never)]
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public void ReleaseHdcInternal (IntPtr hdc)
{
Status status = Status.InvalidParameter;
diff --git a/mcs/class/System.Drawing/System.Drawing/Icon.cs b/mcs/class/System.Drawing/System.Drawing/Icon.cs
index f2da71b3141..8352f15c670 100644
--- a/mcs/class/System.Drawing/System.Drawing/Icon.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Icon.cs
@@ -38,7 +38,6 @@ using System.Drawing.Imaging;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
-using System.Security.Permissions;
namespace System.Drawing
{
@@ -338,7 +337,6 @@ namespace System.Drawing
}
#if !MONOTOUCH
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public static Icon FromHandle (IntPtr handle)
{
if (handle == IntPtr.Zero)
diff --git a/mcs/class/System.Drawing/System.Drawing/Region.cs b/mcs/class/System.Drawing/System.Drawing/Region.cs
index 3b1f0b3d911..0e3a550886d 100644
--- a/mcs/class/System.Drawing/System.Drawing/Region.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Region.cs
@@ -30,7 +30,6 @@
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
-using System.Security.Permissions;
namespace System.Drawing
{
@@ -510,7 +509,6 @@ namespace System.Drawing
return result;
}
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public static Region FromHrgn (IntPtr hrgn)
{
if (hrgn == IntPtr.Zero)
@@ -639,7 +637,6 @@ namespace System.Drawing
}
}
// why is this a instance method ? and not static ?
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public void ReleaseHrgn (IntPtr regionHandle)
{
if (regionHandle == IntPtr.Zero)
diff --git a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs b/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
index da5aca1d82a..cdcdd99d2e5 100644
--- a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
+++ b/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
@@ -46,7 +46,6 @@ namespace System.Drawing
/// <summary>
/// GDI+ API Functions
/// </summary>
- [SuppressUnmanagedCodeSecurity]
internal static class GDIPlus {
public const int FACESIZE = 32;
public const int LANG_NEUTRAL = 0;
diff --git a/mcs/class/System.Drawing/System.Drawing/macFunctions.cs b/mcs/class/System.Drawing/System.Drawing/macFunctions.cs
index 98d666b7078..7fe2e704a8f 100644
--- a/mcs/class/System.Drawing/System.Drawing/macFunctions.cs
+++ b/mcs/class/System.Drawing/System.Drawing/macFunctions.cs
@@ -34,7 +34,6 @@ using System.Security;
namespace System.Drawing {
- [SuppressUnmanagedCodeSecurity]
internal static class MacSupport {
internal static Hashtable contextReference = new Hashtable ();
internal static object lockobj = new object ();