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

DnsPermissionAttribute.cs « System.Net « System « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5b8a3a18f45debe8592602fc339b95548ef46174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// System.Net.DnsPermissionAttribute.cs
//
// Author:
//   Lawrence Pit (loz@cable.a2000.nl)
//

using System;
using System.Security;
using System.Security.Permissions;

namespace System.Net
{
	[AttributeUsage (AttributeTargets.Assembly 
	               | AttributeTargets.Class 
	               | AttributeTargets.Struct 
	               | AttributeTargets.Constructor 
	               | AttributeTargets.Method)
	]	
	[Serializable]
	public sealed class DnsPermissionAttribute : CodeAccessSecurityAttribute
	{
		
		// Constructors
		public DnsPermissionAttribute (SecurityAction action) : base (action)
		{
		}

		// Methods
		
		public override IPermission CreatePermission () {
			return new DnsPermission (
				this.Unrestricted ?
				PermissionState.Unrestricted :
				PermissionState.None);
		}		
	}
}