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
- BooleanExpr.cs
- QilIterator.cs
- storepermissionattribute.cs
- WebControlsSection.cs
- IISMapPath.cs
- TextTrailingWordEllipsis.cs
- SoapHeaders.cs
- MemberAccessException.cs
- ExpressionDumper.cs
- XPathNodeInfoAtom.cs
- InteropBitmapSource.cs
- PersonalizationDictionary.cs
- ResXResourceReader.cs
- TransformConverter.cs
- PrtCap_Reader.cs
- CssStyleCollection.cs
- StreamInfo.cs
- SystemSounds.cs
- EmptyReadOnlyDictionaryInternal.cs
- RootProfilePropertySettingsCollection.cs
- HijriCalendar.cs
- FixUpCollection.cs
- ContainerSelectorActiveEvent.cs
- Attributes.cs
- UserControlCodeDomTreeGenerator.cs
- BatchParser.cs
- CorePropertiesFilter.cs
- WindowsTooltip.cs
- XsltContext.cs
- BitmapEffectDrawingContextWalker.cs
- ScriptResourceHandler.cs
- ResourceExpressionBuilder.cs
- MainMenu.cs
- StyleCollection.cs
- BamlVersionHeader.cs
- ContentValidator.cs
- XPathDocumentBuilder.cs
- WeakEventManager.cs
- WebMessageEncoderFactory.cs
- COM2ComponentEditor.cs
- EntityDataSourceUtil.cs
- JsonXmlDataContract.cs
- Point3DCollection.cs
- WebPartDisplayModeCancelEventArgs.cs
- HMACSHA384.cs
- OleDbConnectionFactory.cs
- XsdValidatingReader.cs
- IntSecurity.cs
- SchemaManager.cs
- SpellerStatusTable.cs
- SoapTypeAttribute.cs
- ShowExpandedMultiValueConverter.cs
- AuthenticationSection.cs
- PropertyItem.cs
- ThrowHelper.cs
- ListChangedEventArgs.cs
- XmlElementAttribute.cs
- RawStylusInput.cs
- UnsafeNativeMethods.cs
- FlowDocumentView.cs
- EntityAdapter.cs
- Padding.cs
- SelectionChangedEventArgs.cs
- DataGridTablesFactory.cs
- ProfilePropertySettingsCollection.cs
- Vector3dCollection.cs
- XmlC14NWriter.cs
- WorkflowViewElement.cs
- CacheOutputQuery.cs
- UITypeEditor.cs
- Transform3DCollection.cs
- WebPartVerbsEventArgs.cs
- LocalFileSettingsProvider.cs
- RegexGroup.cs
- SchemaImporterExtensionElementCollection.cs
- AgileSafeNativeMemoryHandle.cs
- Util.cs
- LinkedResourceCollection.cs
- GenericWebPart.cs
- ProgressChangedEventArgs.cs
- SettingsSavedEventArgs.cs
- Geometry.cs
- SharedPerformanceCounter.cs
- DataGridViewHitTestInfo.cs
- LicenseManager.cs
- ResourcePart.cs
- Serializer.cs
- TextServicesCompartment.cs
- WindowPattern.cs
- ComponentEditorPage.cs
- TemplateGroupCollection.cs
- HostVisual.cs
- ToolStripMenuItem.cs
- CommandPlan.cs
- DataReceivedEventArgs.cs
- LongAverageAggregationOperator.cs
- DbProviderServices.cs
- LockRecoveryTask.cs
- SymLanguageType.cs
- SecurityUtils.cs