Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / security / system / security / permissions / typedescriptorpermissionattribute.cs / 1305376 / typedescriptorpermissionattribute.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // TypeDescriptorPermissionAttribute.cs // namespace System.Security.Permissions { [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false )] [Serializable()] public sealed class TypeDescriptorPermissionAttribute : CodeAccessSecurityAttribute { TypeDescriptorPermissionFlags m_flags = TypeDescriptorPermissionFlags.NoFlags; public TypeDescriptorPermissionAttribute(SecurityAction action) : base(action) {} public TypeDescriptorPermissionFlags Flags { get { return m_flags; } set { TypeDescriptorPermission.VerifyFlags(value); m_flags = value; } } public bool RestrictedRegistrationAccess { get { return (m_flags & TypeDescriptorPermissionFlags.RestrictedRegistrationAccess) != 0; } set { m_flags = value ? m_flags | TypeDescriptorPermissionFlags.RestrictedRegistrationAccess : m_flags & ~TypeDescriptorPermissionFlags.RestrictedRegistrationAccess; } } public override IPermission CreatePermission() { if (Unrestricted) return new TypeDescriptorPermission(PermissionState.Unrestricted); else return new TypeDescriptorPermission(m_flags); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpConfigurationContext.cs
- Int16.cs
- GridViewRowPresenter.cs
- EndpointReference.cs
- CommentEmitter.cs
- HtmlElementEventArgs.cs
- DictionaryEntry.cs
- TextSelectionHighlightLayer.cs
- WebPartConnectionsConnectVerb.cs
- DataStreams.cs
- HtmlTernaryTree.cs
- MouseBinding.cs
- Parsers.cs
- WindowsIdentity.cs
- StatusBarAutomationPeer.cs
- InvokeProviderWrapper.cs
- DetailsViewModeEventArgs.cs
- Part.cs
- AnnotationAuthorChangedEventArgs.cs
- XmlQueryStaticData.cs
- HierarchicalDataTemplate.cs
- SequentialOutput.cs
- UiaCoreApi.cs
- ControlIdConverter.cs
- ParameterCollection.cs
- ServiceCredentialsElement.cs
- DescendantOverDescendantQuery.cs
- Trace.cs
- Renderer.cs
- QilStrConcatenator.cs
- StylusButton.cs
- URL.cs
- TableCellCollection.cs
- PasswordTextNavigator.cs
- TextTreeRootTextBlock.cs
- AttributeUsageAttribute.cs
- CodeTypeDeclarationCollection.cs
- PrintPreviewControl.cs
- KnownTypesProvider.cs
- SafeBitVector32.cs
- Math.cs
- EnumerableRowCollection.cs
- ParameterBuilder.cs
- ExceptionHandlers.cs
- Group.cs
- LineInfo.cs
- FontWeightConverter.cs
- SpellerHighlightLayer.cs
- ConnectionInterfaceCollection.cs
- HttpsHostedTransportConfiguration.cs
- SequenceRange.cs
- sqlser.cs
- ListParaClient.cs
- MatcherBuilder.cs
- GetBrowserTokenRequest.cs
- UnsafeNativeMethods.cs
- HeaderedContentControl.cs
- MinimizableAttributeTypeConverter.cs
- ConfigurationException.cs
- CancellationState.cs
- StaticSiteMapProvider.cs
- AtomServiceDocumentSerializer.cs
- PeerNode.cs
- DuplicateWaitObjectException.cs
- DetectEofStream.cs
- ExtractorMetadata.cs
- __Filters.cs
- WebEvents.cs
- WebDisplayNameAttribute.cs
- COSERVERINFO.cs
- MetadataCache.cs
- MessageHeaderDescription.cs
- AddingNewEventArgs.cs
- StatusBarItemAutomationPeer.cs
- AliasGenerator.cs
- _StreamFramer.cs
- StateItem.cs
- HtmlInputHidden.cs
- ActionMismatchAddressingException.cs
- ImageSourceConverter.cs
- TextEditorTyping.cs
- Send.cs
- HandlerFactoryWrapper.cs
- SourceChangedEventArgs.cs
- OleStrCAMarshaler.cs
- WindowsListViewItemStartMenu.cs
- DeploymentExceptionMapper.cs
- MsmqMessageProperty.cs
- ValueChangedEventManager.cs
- MarkupProperty.cs
- StrongNameUtility.cs
- MessagePropertyAttribute.cs
- PointLight.cs
- TransactionsSectionGroup.cs
- SerTrace.cs
- TraceListener.cs
- querybuilder.cs
- HierarchicalDataTemplate.cs
- UndoUnit.cs
- XmlSchemaDatatype.cs