mscorlib(4.0.0.0) API with additions
IntSecurity.cs
1 using System.IO;
2 using System.Security;
4 
5 namespace System.ComponentModel
6 {
7  [HostProtection(SecurityAction.LinkDemand, SharedState = true)]
8  internal static class IntSecurity
9  {
10  public static readonly CodeAccessPermission UnmanagedCode = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
11 
12  public static readonly CodeAccessPermission FullReflection = new ReflectionPermission(PermissionState.Unrestricted);
13 
14  public static string UnsafeGetFullPath(string fileName)
15  {
16  FileIOPermission fileIOPermission = new FileIOPermission(PermissionState.None);
17  fileIOPermission.AllFiles = FileIOPermissionAccess.PathDiscovery;
18  fileIOPermission.Assert();
19  try
20  {
21  return Path.GetFullPath(fileName);
22  }
23  finally
24  {
26  }
27  }
28  }
29 }
Describes a set of security permissions applied to code. This class cannot be inherited.
FileIOPermissionAccess
Specifies the type of file access requested.
Definition: __Canon.cs:3
SecurityAction
Specifies the security actions that can be performed using declarative security.
Defines the underlying structure of all code access permissions.
static string GetFullPath(string path)
Returns the absolute path for the specified path string.
Definition: Path.cs:446
FileIOPermissionAccess AllFiles
Gets or sets the permitted access to all files.
static void RevertAssert()
Causes any previous M:System.Security.CodeAccessPermission.Assert for the current frame to be removed...
PermissionState
Specifies whether a permission should have all or no access to resources at creation.
void Assert()
Declares that the calling code can access the resource protected by a permission demand through the c...
Controls the ability to access files and folders. This class cannot be inherited.
SecurityPermissionFlag
Specifies access flags for the security permission object.
Controls access to non-public types and members through the N:System.Reflection APIs....
Performs operations on T:System.String instances that contain file or directory path information....
Definition: Path.cs:13