128 references to AddPermission
mscorlib (18)
system\bcldebug.cs (2)
358perms.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted)); 359perms.AddPermission(new FileIOPermission(FileIOPermissionAccess.AllAccess, Path.GetFullPath(".")));
system\globalization\japanesecalendar.cs (1)
172permSet.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, c_japaneseErasHivePermissionList));
system\resources\resourcewriter.cs (2)
355permSet.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted)); 356permSet.AddPermission(new FileIOPermission(PermissionState.Unrestricted));
system\rttype.cs (2)
5390ps.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess)); 5392ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode));
system\security\codeaccesssecurityengine.cs (1)
511demandSet.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.RestrictedMemberAccess));
system\security\framesecuritydescriptor.cs (1)
92permSet.AddPermission(perm.Copy());
system\security\permissionset.cs (3)
2321pset.AddPermission(perm); 2393IPermission unionPerm = casPset.AddPermission(perm); 2402IPermission unionPerm = nonCasPset.AddPermission( perm );
system\security\policymanager.cs (1)
184grant.AddPermission( perm );
system\security\securitymanager.cs (1)
470requested.AddPermission( executionSecurityPermission );
system\timezoneinfo.cs (4)
930permSet.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, c_timeZonesRegistryHivePermissionList)); 1429permSet.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, c_timeZonesRegistryHivePermissionList)); 2484permSet.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, c_timeZonesRegistryHivePermissionList)); 2769permSet.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, c_timeZonesRegistryHivePermissionList));
PresentationCore (12)
Core\CSharp\MS\Internal\AppModel\CustomCredentialPolicy.cs (2)
68_environmentPermissionSet.AddPermission(new EnvironmentPermission(EnvironmentPermissionAccess.Read, "USERDOMAIN")); 69_environmentPermissionSet.AddPermission(new EnvironmentPermission(EnvironmentPermissionAccess.Read, "USERNAME"));
Core\CSharp\MS\Internal\FontCache\FontSourceCollection.cs (2)
175permissionSet.AddPermission(new FileIOPermission( 180permissionSet.AddPermission(new RegistryPermission(
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
382permissionSet.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, 385permissionSet.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted));
Core\CSharp\System\Windows\Input\Command\ApplicationCommands.cs (1)
265permissions.AddPermission(new UIPermission(UIPermissionClipboard.AllClipboard));
Core\CSharp\System\Windows\Interop\HwndTarget.cs (3)
1599unpackPermissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter | SecurityPermissionFlag.UnmanagedCode | SecurityPermissionFlag.RemotingConfiguration)); 1600unpackPermissionSet.AddPermission(new System.Net.DnsPermission(PermissionState.Unrestricted)); 1601unpackPermissionSet.AddPermission(new System.Net.SocketPermission(PermissionState.Unrestricted));
Shared\MS\Internal\SecurityHelper.cs (2)
373psToCheck.AddPermission(permissionsToCheck[i]); 402psToCheck.AddPermission(permissionToCheck);
PresentationFramework (25)
src\Framework\MS\Internal\AppModel\ContentFilePart.cs (1)
135permissionSet.AddPermission(new FileIOPermission(PermissionState.Unrestricted));
src\Framework\System\Windows\Application.cs (2)
2613permissions.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, SYSTEM_SOUNDS_REGISTRY_BASE)); 2614permissions.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted));
src\Framework\System\Windows\Controls\GridViewColumnHeader.cs (3)
782permissions.AddPermission(filePermission); 784permissions.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted)); 785permissions.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode));
src\Framework\System\Windows\Controls\InkCanvas.cs (2)
2272ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter)); 2273ps.AddPermission(new UIPermission(UIPermissionClipboard.AllClipboard));
src\Framework\System\Windows\Documents\RubberbandSelector.cs (4)
262ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter)); 263ps.AddPermission(new UIPermission(UIPermissionClipboard.AllClipboard)); 264ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode)); 269ps.AddPermission(mediaAccessPermission);
src\Framework\System\Windows\Interop\DocobjHost.cs (13)
951permissionSet.AddPermission(new FileDialogPermission(FileDialogPermissionAccess.Open)); 952permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 953permissionSet.AddPermission(new UIPermission(UIPermissionWindow.SafeTopLevelWindows)); 954permissionSet.AddPermission(new UIPermission(UIPermissionClipboard.OwnClipboard)); 955permissionSet.AddPermission(new MediaPermission(MediaPermissionImage.SafeImage)); 962permissionSet.AddPermission(storagePermission); 985permissionSet.AddPermission(new FileDialogPermission(FileDialogPermissionAccess.Open)); 986permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 987permissionSet.AddPermission(new UIPermission(UIPermissionWindow.SafeTopLevelWindows)); 988permissionSet.AddPermission(new UIPermission(UIPermissionClipboard.OwnClipboard)); 989permissionSet.AddPermission(SystemDrawingHelper.NewSafePrintingPermission()); 990permissionSet.AddPermission(new MediaPermission(MediaPermissionAudio.SafeAudio, MediaPermissionVideo.SafeVideo, MediaPermissionImage.SafeImage)); 991permissionSet.AddPermission(new WebBrowserPermission(WebBrowserPermissionLevel.Safe));
System (18)
compmod\system\componentmodel\TypeDescriptor.cs (4)
370typeDescriptorPermission.AddPermission(new TypeDescriptorPermission(TypeDescriptorPermissionFlags.RestrictedRegistrationAccess)); 408typeDescriptorPermission.AddPermission(new TypeDescriptorPermission(TypeDescriptorPermissionFlags.RestrictedRegistrationAccess)); 3245typeDescriptorPermission.AddPermission(new TypeDescriptorPermission(TypeDescriptorPermissionFlags.RestrictedRegistrationAccess)); 3282typeDescriptorPermission.AddPermission(new TypeDescriptorPermission(TypeDescriptorPermissionFlags.RestrictedRegistrationAccess));
misc\SecurityUtils.cs (1)
74targetGrantSet.AddPermission(RestrictedMemberAccessPermission);
net\System\Net\_AutoWebProxyScriptWrapper.cs (2)
598perms.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 618permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution));
security\system\security\cryptography\x509\x509chain.cs (2)
199ps.AddPermission(new WebPermission(PermissionState.Unrestricted)); 200ps.AddPermission(new StorePermission(StorePermissionFlags.AddToStore));
services\monitoring\system\diagnosticts\EventLog.cs (3)
77permissionSet.AddPermission(registryPermission); 82permissionSet.AddPermission(environmentPermission); 86permissionSet.AddPermission(securityPermission);
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (6)
236ps.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted)); 237ps.AddPermission(new FileIOPermission(FileIOPermissionAccess.Write, tempPath)); 622ps.AddPermission(new RegistryPermission(PermissionState.Unrestricted)); 623ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode)); 959ps.AddPermission(new RegistryPermission(PermissionState.Unrestricted)); 960ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode));
System.Activities (2)
System\Activities\Debugger\StateManager.cs (1)
716unmanagedCodePermissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode));
System\Activities\Runtime\CallbackWrapper.cs (1)
287myPermissionSet.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess));
System.AddIn (15)
System\Addin\Hosting\ActivationWorker.cs (5)
85permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, 87permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, 89permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, 91permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, 258permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, dir));
System\Addin\Hosting\AddInActivator.cs (3)
322permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, 493assertSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, hostAdapter.Location)); 494assertSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, contract.Location));
System\Addin\Hosting\AddInControllerImpl.cs (2)
206permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, 208permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery,
System\Addin\Hosting\AddInServer.cs (3)
121permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlPrincipal)); 122permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode)); 123permissionSet.AddPermission(new ReflectionPermission(PermissionState.Unrestricted));
System\Addin\Hosting\AddInStore.cs (2)
1022permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter)); 1023permissionSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.AllAccess, cacheFileName));
System.Data (7)
fx\src\data\System\Data\Odbc\OdbcConnectionString.cs (1)
51permissionSet.AddPermission(new OdbcPermission(this));
fx\src\data\System\Data\OleDb\oledbconnectionstring.cs (1)
165permissionSet.AddPermission(new OleDbPermission(this));
fx\src\data\System\Data\OleDb\OleDbDataAdapter.cs (2)
168permissionSet.AddPermission(new System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)); 192permissionSet.AddPermission(new System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode));
fx\src\Data\System\Data\ProviderBase\DbConnectionHelper.cs (2)
215permissionSet.AddPermission(CONNECTIONOBJECTNAME.ExecutePermission); // MDAC 81476 216permissionSet.AddPermission(new System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode));
fx\src\data\System\Data\SqlClient\SqlConnectionString.cs (1)
598permissionSet.AddPermission(new SqlClientPermission(this));
System.Data.Entity (1)
System\Data\Objects\Internal\EntityProxyFactory.cs (1)
1614serializationFormatterPermissions.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter));
System.Data.Linq (1)
parent\parent\misc\SecurityUtils.cs (1)
74targetGrantSet.AddPermission(RestrictedMemberAccessPermission);
System.Data.SqlXml (2)
System\Xml\Xsl\IlGen\XmlILModule.cs (2)
48CreateModulePermissionSet.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess)); 51CreateModulePermissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlEvidence | SecurityPermissionFlag.UnmanagedCode));
System.IdentityModel (2)
System\IdentityModel\Selectors\X509CertificateChain.cs (2)
95ps.AddPermission(new WebPermission(PermissionState.Unrestricted)); 96ps.AddPermission(new StorePermission(StorePermissionFlags.AddToStore));
System.Web (9)
parent\parent\parent\Misc\SecurityUtils.cs (1)
74targetGrantSet.AddPermission(RestrictedMemberAccessPermission);
UI\WebParts\ImportCatalogPart.cs (4)
175pset.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 176pset.AddPermission(new AspNetHostingPermission(AspNetHostingPermissionLevel.Minimal)); 219mediumPset.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 220mediumPset.AddPermission(new AspNetHostingPermission(AspNetHostingPermissionLevel.Medium));
UI\WebParts\WebPartManager.cs (4)
465_mediumPermissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 466_mediumPermissionSet.AddPermission(new AspNetHostingPermission(AspNetHostingPermissionLevel.Medium)); 478_minimalPermissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 479_minimalPermissionSet.AddPermission(new AspNetHostingPermission(AspNetHostingPermissionLevel.Minimal));
System.Windows.Forms (3)
misc\SecurityUtils.cs (1)
74targetGrantSet.AddPermission(RestrictedMemberAccessPermission);
winforms\Managed\System\WinForms\ListView.cs (2)
4796permSet.AddPermission(envPermission); 4797permSet.AddPermission(fiop);
System.Xml (8)
System\Xml\Serialization\Compilation.cs (1)
252perms.AddPermission(new FileIOPermission(PermissionState.Unrestricted));
System\Xml\Serialization\Compiler.cs (6)
122perms.AddPermission(new FileIOPermission(PermissionState.Unrestricted)); 123perms.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted)); 171perms.AddPermission(TempAssembly.FileIOPermission); 173perms.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted)); 174perms.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode)); 175perms.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlEvidence));
System\Xml\Xslt\XslCompiledTransform.cs (1)
58MemberAccessPermissionSet.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess));
WindowsBase (5)
Shared\MS\Internal\Invariant.cs (1)
310ps.AddPermission(regPerm);
Shared\MS\Internal\IO\Packaging\PackagingUtilities.cs (2)
554permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlPrincipal)); 555permissionSet.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read,
Shared\MS\Internal\TextServicesLoader.cs (2)
213ps.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\CTF")); 214ps.AddPermission(new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_CURRENT_USER\\Software\\Microsoft\\CTF"));