Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CommonUI / System / Drawing / Printing / PrintingPermissionAttribute.cs / 1 / PrintingPermissionAttribute.cs
/* * Copyright (c) 2000 Microsoft Corporation. All Rights Reserved. * Microsoft Confidential. */ namespace System.Drawing.Printing { using System; using System.Security; using System.Security.Permissions; using System.IO; using System.Runtime.Serialization; using System.Reflection; using System.Collections; using System.Diagnostics.CodeAnalysis; ///[AttributeUsage(AttributeTargets.All, AllowMultiple = true)] public sealed class PrintingPermissionAttribute : CodeAccessSecurityAttribute { PrintingPermissionLevel level; /// public PrintingPermissionAttribute(SecurityAction action) : base(action) { } /// public PrintingPermissionLevel Level { get { return level; } set { if (value < PrintingPermissionLevel.NoPrinting || value > PrintingPermissionLevel.AllPrinting) { throw new ArgumentException(SR.GetString(SR.PrintingPermissionAttributeInvalidPermissionLevel), "value"); } level = value; } } /// [SuppressMessage("Microsoft.Security", "CA2103:ReviewImperativeSecurity")] public override IPermission CreatePermission() { if (Unrestricted) { return new PrintingPermission(PermissionState.Unrestricted); } else { return new PrintingPermission(level); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbConnectionClosed.cs
- CompoundFileReference.cs
- IriParsingElement.cs
- CodeDirectiveCollection.cs
- TextAction.cs
- EtwTrace.cs
- ExpandableObjectConverter.cs
- EntityProviderFactory.cs
- ZipPackage.cs
- Calendar.cs
- XmlnsCompatibleWithAttribute.cs
- Dictionary.cs
- URLMembershipCondition.cs
- ImageAutomationPeer.cs
- RouteItem.cs
- DataObjectPastingEventArgs.cs
- Vertex.cs
- PairComparer.cs
- ToolStripScrollButton.cs
- MergeLocalizationDirectives.cs
- TemplateXamlParser.cs
- DBCommand.cs
- PolygonHotSpot.cs
- DataControlFieldCell.cs
- TextReader.cs
- LocalFileSettingsProvider.cs
- BindStream.cs
- SqlDataSource.cs
- PriorityRange.cs
- OperandQuery.cs
- XmlComplianceUtil.cs
- PreProcessInputEventArgs.cs
- TextSegment.cs
- ProcessThread.cs
- EUCJPEncoding.cs
- InlineCollection.cs
- EntityContainerRelationshipSet.cs
- EventDrivenDesigner.cs
- BufferBuilder.cs
- BindingBase.cs
- QilVisitor.cs
- CodeSnippetCompileUnit.cs
- SimpleFieldTemplateFactory.cs
- AsyncContentLoadedEventArgs.cs
- DataBindingCollectionEditor.cs
- HwndHost.cs
- CssTextWriter.cs
- CodeFieldReferenceExpression.cs
- TextFormatterImp.cs
- ResourcesGenerator.cs
- TextAnchor.cs
- XmlSchemaSimpleTypeUnion.cs
- FilterQuery.cs
- TableDetailsRow.cs
- FormsIdentity.cs
- CodeAccessPermission.cs
- ModelUIElement3D.cs
- ProxyWebPart.cs
- OTFRasterizer.cs
- LinkedList.cs
- MailWebEventProvider.cs
- ColorContextHelper.cs
- AdRotator.cs
- OlePropertyStructs.cs
- HtmlInputFile.cs
- DetailsViewInsertEventArgs.cs
- ObjectToIdCache.cs
- ScrollBarRenderer.cs
- StateBag.cs
- unitconverter.cs
- HebrewCalendar.cs
- OdbcPermission.cs
- BindingBase.cs
- Pen.cs
- DelegateInArgument.cs
- DiagnosticsConfigurationHandler.cs
- Help.cs
- CryptoProvider.cs
- PtsHost.cs
- BuildProviderAppliesToAttribute.cs
- XmlElementAttributes.cs
- ParameterBinding.cs
- AppSettingsReader.cs
- EdmComplexPropertyAttribute.cs
- CodeCompileUnit.cs
- ReferencedCategoriesDocument.cs
- _NegotiateClient.cs
- WeakHashtable.cs
- BrowserTree.cs
- CategoryAttribute.cs
- ClientConfigurationHost.cs
- UserPreferenceChangedEventArgs.cs
- dbenumerator.cs
- BaseDataBoundControl.cs
- EventMappingSettings.cs
- TableDesigner.cs
- QueryNode.cs
- XmlSchemaImport.cs
- XmlObjectSerializer.cs
- DropDownHolder.cs