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