Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / AccessControl / PrivilegeNotHeldException.cs / 1 / PrivilegeNotHeldException.cs
// Copyright (c) Microsoft Corporation. All rights reserved. using Microsoft.Win32; using System; using System.Runtime.Serialization; using System.Text; using System.Globalization; using System.Security.Permissions; namespace System.Security.AccessControl { [Serializable] public sealed class PrivilegeNotHeldException : UnauthorizedAccessException, ISerializable { private readonly string _privilegeName = null; public PrivilegeNotHeldException() : base( Environment.GetResourceString( "PrivilegeNotHeld_Default" )) { } public PrivilegeNotHeldException( string privilege ) : base( string.Format( CultureInfo.CurrentCulture, Environment.GetResourceString( "PrivilegeNotHeld_Named" ), privilege )) { _privilegeName = privilege; } public PrivilegeNotHeldException( string privilege, Exception inner ) : base( string.Format( CultureInfo.CurrentCulture, Environment.GetResourceString( "PrivilegeNotHeld_Named" ), privilege ), inner ) { _privilegeName = privilege; } internal PrivilegeNotHeldException( SerializationInfo info, StreamingContext context ) : base( info, context ) { _privilegeName = info.GetString("PrivilegeName"); } public string PrivilegeName { get { return _privilegeName; } } [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData( SerializationInfo info, StreamingContext context ) { if ( info == null ) { throw new ArgumentNullException( "info" ); } base.GetObjectData(info, context); info.AddValue("PrivilegeName", _privilegeName, typeof( string )); } } } // 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
- HandleScope.cs
- SqlHelper.cs
- CodeTypeReferenceSerializer.cs
- AgileSafeNativeMemoryHandle.cs
- _emptywebproxy.cs
- StringValueSerializer.cs
- TypeReference.cs
- ExceptionRoutedEventArgs.cs
- SqlCommandBuilder.cs
- PrivilegeNotHeldException.cs
- KnowledgeBase.cs
- UnsafeMethods.cs
- Descriptor.cs
- ServiceDescription.cs
- UnicastIPAddressInformationCollection.cs
- RelationshipManager.cs
- CalendarTable.cs
- AuthenticationModulesSection.cs
- SmiMetaDataProperty.cs
- QueueProcessor.cs
- Ops.cs
- NCryptNative.cs
- Color.cs
- ListParagraph.cs
- WebPartTransformerAttribute.cs
- BitStack.cs
- GridViewCommandEventArgs.cs
- WebPartAddingEventArgs.cs
- WebPartVerbCollection.cs
- InputLanguage.cs
- XmlSchemaDocumentation.cs
- ExplicitDiscriminatorMap.cs
- WebPartDescription.cs
- SqlConnection.cs
- BamlStream.cs
- NumberSubstitution.cs
- OleDbStruct.cs
- Listbox.cs
- FormatterServices.cs
- RequiredAttributeAttribute.cs
- UnsafeNativeMethodsCLR.cs
- MsmqIntegrationChannelListener.cs
- GAC.cs
- Property.cs
- WorkflowServiceHost.cs
- DbgUtil.cs
- WCFBuildProvider.cs
- SiteMapHierarchicalDataSourceView.cs
- LicenseManager.cs
- ChangePassword.cs
- WebBrowsableAttribute.cs
- CryptoProvider.cs
- SafeFileMappingHandle.cs
- StyleSheetComponentEditor.cs
- ContentPropertyAttribute.cs
- ListViewGroupItemCollection.cs
- RemotingException.cs
- EventListener.cs
- MsmqTransportElement.cs
- PageCatalogPartDesigner.cs
- COAUTHINFO.cs
- ListViewSelectEventArgs.cs
- OutputCacheProfile.cs
- ProtocolsConfigurationEntry.cs
- DbProviderFactoriesConfigurationHandler.cs
- CompensationExtension.cs
- CopyCodeAction.cs
- ListViewHitTestInfo.cs
- StyleSheetRefUrlEditor.cs
- ConstraintCollection.cs
- ValueHandle.cs
- TextSegment.cs
- TransactedBatchingBehavior.cs
- ChannelServices.cs
- CommonDialog.cs
- CollectionConverter.cs
- WinOEToolBoxItem.cs
- Clipboard.cs
- ObjectSet.cs
- File.cs
- Win32PrintDialog.cs
- DataBoundLiteralControl.cs
- TrackingProfileCache.cs
- ListView.cs
- WindowsSecurityTokenAuthenticator.cs
- TextDpi.cs
- ServiceObjectContainer.cs
- ConnectivityStatus.cs
- CookieProtection.cs
- ContextMenuStripActionList.cs
- OptimizedTemplateContent.cs
- ConfigurationPropertyCollection.cs
- PropertyConverter.cs
- ExceptionCollection.cs
- FreezableCollection.cs
- CallTemplateAction.cs
- dataprotectionpermission.cs
- LinkedResourceCollection.cs
- Run.cs
- SamlSerializer.cs