Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Attributes.cs / 1 / Attributes.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System.Runtime.InteropServices; namespace System.Security { // DynamicSecurityMethodAttribute: // Indicates that calling the target method requires space for a security // object to be allocated on the callers stack. This attribute is only ever // set on certain security methods defined within mscorlib. [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false )] sealed internal class DynamicSecurityMethodAttribute : System.Attribute { } // SuppressUnmanagedCodeSecurityAttribute: // Indicates that the target P/Invoke method(s) should skip the per-call // security checked for unmanaged code permission. [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = true, Inherited = false )] [System.Runtime.InteropServices.ComVisible(true)] sealed public class SuppressUnmanagedCodeSecurityAttribute : System.Attribute { } // UnverifiableCodeAttribute: // Indicates that the target module contains unverifiable code. [AttributeUsage(AttributeTargets.Module, AllowMultiple = true, Inherited = false )] [System.Runtime.InteropServices.ComVisible(true)] sealed public class UnverifiableCodeAttribute : System.Attribute { } // AllowPartiallyTrustedCallersAttribute: // Indicates that the Assembly is secure and can be used by untrusted // and semitrusted clients // For v.1, this is valid only on Assemblies, but could be expanded to // include Module, Method, class [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false )] [System.Runtime.InteropServices.ComVisible(true)] sealed public class AllowPartiallyTrustedCallersAttribute : System.Attribute { public AllowPartiallyTrustedCallersAttribute () { } } public enum SecurityCriticalScope { Explicit = 0, Everything = 0x1 } // SecurityCriticalAttribute // Indicates that the decorated code or assembly performs security critical operations (e.g. Assert, "unsafe", LinkDemand, etc.) // The attribute can be placed on most targets, except on arguments/return values. // The attribute applies only to the specific target and not to everything underneath it (similar to 'public' qualifier) // i.e. marking an assembly SecurityCritical doesn't imply all types within the assembly are critical, // and similarly marking a type critical doesn't imply all of its members are critical // For code to perform security critical actions, both the code (e.g. method, field, etc.) and the assembly must be decorated // with the SecurityCriticalAttribute. [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false )] sealed public class SecurityCriticalAttribute : System.Attribute { internal SecurityCriticalScope _val; public SecurityCriticalAttribute () {} public SecurityCriticalAttribute(SecurityCriticalScope scope) { _val = scope; } public SecurityCriticalScope Scope { get { return _val; } } } // SecurityTreatAsSafeAttribute: // Indicates that the code may contain violations to the security critical rules (e.g. transitions from // critical to non-public transparent, transparent to non-public critical, etc.), has been audited for // security concerns and is considered security clean. // At assembly-scope, all rule checks will be suppressed within the assembly and for calls made against the assembly. // At type-scope, all rule checks will be suppressed for members within the type and for calls made against the type. // At member level (e.g. field and method) the code will be treated as public - i.e. no rule checks for the members. [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false )] sealed public class SecurityTreatAsSafeAttribute : System.Attribute { public SecurityTreatAsSafeAttribute () { } } // SecurityTransparentAttribute: // Indicates the assembly contains only transparent code. // Security critical actions will be restricted or converted into less critical actions. For example, // Assert will be restricted, SuppressUnmanagedCode, LinkDemand, unsafe, and unverifiable code will be converted // into Full-Demands. [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false )] sealed public class SecurityTransparentAttribute : System.Attribute { public SecurityTransparentAttribute () {} } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SQLDouble.cs
- TextEndOfSegment.cs
- LinkedList.cs
- ParserContext.cs
- SafeArrayRankMismatchException.cs
- WindowsGraphics.cs
- Timer.cs
- IEnumerable.cs
- BamlBinaryReader.cs
- FileRecordSequence.cs
- NativeMethods.cs
- AuthorizationRule.cs
- ServicePointManager.cs
- BitmapData.cs
- StateManagedCollection.cs
- GridView.cs
- SqlClientWrapperSmiStream.cs
- Msec.cs
- ServiceHttpHandlerFactory.cs
- FileRecordSequence.cs
- ScrollChrome.cs
- AnnotationAuthorChangedEventArgs.cs
- FixedSOMImage.cs
- EncodingInfo.cs
- Config.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ProtocolsConfigurationHandler.cs
- DbConnectionPoolIdentity.cs
- TargetControlTypeAttribute.cs
- HtmlTitle.cs
- HwndKeyboardInputProvider.cs
- MetadataSet.cs
- IIS7ConfigurationLoader.cs
- SystemInformation.cs
- NativeBuffer.cs
- Rect3D.cs
- IndicShape.cs
- mediaeventshelper.cs
- _FtpDataStream.cs
- RadioButtonRenderer.cs
- ContainerUIElement3D.cs
- ImageField.cs
- ContextProperty.cs
- Condition.cs
- BindingCompleteEventArgs.cs
- CharUnicodeInfo.cs
- ADMembershipProvider.cs
- DelayLoadType.cs
- ScrollBarRenderer.cs
- IISMapPath.cs
- XamlInt32CollectionSerializer.cs
- AssemblyAttributes.cs
- ImageInfo.cs
- StylusPointCollection.cs
- HashMembershipCondition.cs
- ExpressionTable.cs
- PathFigure.cs
- InfoCardTrace.cs
- ContentWrapperAttribute.cs
- StringAnimationUsingKeyFrames.cs
- XmlValidatingReaderImpl.cs
- CellParaClient.cs
- EncryptedPackageFilter.cs
- UInt64Converter.cs
- InvalidFilterCriteriaException.cs
- Label.cs
- RSAProtectedConfigurationProvider.cs
- PassportIdentity.cs
- ClientBuildManagerCallback.cs
- DateTimeOffsetStorage.cs
- RequestCachePolicyConverter.cs
- iisPickupDirectory.cs
- BitmapVisualManager.cs
- Avt.cs
- RuleSettings.cs
- CodeTypeMemberCollection.cs
- LayoutEvent.cs
- CapabilitiesSection.cs
- StorageComplexTypeMapping.cs
- ImageIndexConverter.cs
- InfiniteTimeSpanConverter.cs
- BaseParaClient.cs
- XmlSerializerNamespaces.cs
- SafeHandles.cs
- CompModSwitches.cs
- BoolExpression.cs
- DesignerVerb.cs
- KnownTypes.cs
- XmlSignificantWhitespace.cs
- OutputBuffer.cs
- __ComObject.cs
- ObservableCollection.cs
- SqlTriggerContext.cs
- Context.cs
- TreeView.cs
- ErrorTableItemStyle.cs
- Border.cs
- WebBrowserNavigatingEventHandler.cs
- SchemaImporterExtension.cs
- Vector3dCollection.cs