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
- RadioButton.cs
- Substitution.cs
- UmAlQuraCalendar.cs
- ViewLoader.cs
- UnsafeNativeMethodsTablet.cs
- ComplexTypeEmitter.cs
- Trace.cs
- XmlWrappingWriter.cs
- StringSource.cs
- StoragePropertyMapping.cs
- Model3DGroup.cs
- SequentialUshortCollection.cs
- InputLanguageManager.cs
- OdbcDataAdapter.cs
- CodeDirectionExpression.cs
- RC2.cs
- OptionalColumn.cs
- FacetChecker.cs
- FileStream.cs
- PeerEndPoint.cs
- activationcontext.cs
- CalendarDataBindingHandler.cs
- ConnectionManagementElement.cs
- SerializationSectionGroup.cs
- SpeechUI.cs
- DataBoundControl.cs
- WebPartHeaderCloseVerb.cs
- UrlPropertyAttribute.cs
- OperationCanceledException.cs
- XslException.cs
- Win32.cs
- StrokeCollectionConverter.cs
- FlowLayoutPanelDesigner.cs
- PathSegmentCollection.cs
- FormatterConverter.cs
- IssuanceLicense.cs
- DispatchProxy.cs
- PageSetupDialog.cs
- Model3D.cs
- EventToken.cs
- TreeBuilderXamlTranslator.cs
- AccessDataSource.cs
- srgsitem.cs
- StackSpiller.cs
- XmlParser.cs
- ExeConfigurationFileMap.cs
- LinkedList.cs
- PropertyDescriptorGridEntry.cs
- HttpHostedTransportConfiguration.cs
- XamlRtfConverter.cs
- Light.cs
- TypefaceMetricsCache.cs
- VoiceObjectToken.cs
- TextParagraphCache.cs
- _IPv4Address.cs
- OneWayElement.cs
- MasterPage.cs
- SqlBulkCopyColumnMappingCollection.cs
- Asn1Utilities.cs
- ObfuscateAssemblyAttribute.cs
- SecUtil.cs
- HMACSHA512.cs
- EnumUnknown.cs
- ExpressionBinding.cs
- HttpCookiesSection.cs
- ChannelRequirements.cs
- InheritanceService.cs
- MonitoringDescriptionAttribute.cs
- BigIntegerStorage.cs
- Mappings.cs
- TextEditorDragDrop.cs
- AdornerHitTestResult.cs
- RootProfilePropertySettingsCollection.cs
- AtomParser.cs
- WinEventHandler.cs
- NonSerializedAttribute.cs
- NamespaceEmitter.cs
- OutputCacheSection.cs
- Tablet.cs
- MultiBindingExpression.cs
- Delegate.cs
- ActionMessageFilterTable.cs
- SendMailErrorEventArgs.cs
- LinearKeyFrames.cs
- StringCollection.cs
- StylusButtonEventArgs.cs
- WinFormsComponentEditor.cs
- FirstMatchCodeGroup.cs
- EncodingNLS.cs
- MenuBase.cs
- ProcessModuleDesigner.cs
- DataGridViewSelectedRowCollection.cs
- BindingManagerDataErrorEventArgs.cs
- ColumnHeaderConverter.cs
- UserControlBuildProvider.cs
- CookielessHelper.cs
- TextCharacters.cs
- ObjectViewFactory.cs
- ProfileModule.cs
- EventlogProvider.cs