Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / AccessControl / PrivilegeNotHeldException.cs / 1 / PrivilegeNotHeldException.cs
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 )); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MethodExpr.cs
- ThemeInfoAttribute.cs
- _KerberosClient.cs
- SelectorAutomationPeer.cs
- SimpleLine.cs
- TraceUtils.cs
- TreePrinter.cs
- FormatterConverter.cs
- ParameterElementCollection.cs
- MethodImplAttribute.cs
- MethodImplAttribute.cs
- UrlAuthFailedErrorFormatter.cs
- StateRuntime.cs
- ListBox.cs
- LoginStatusDesigner.cs
- ToggleButtonAutomationPeer.cs
- DelegateOutArgument.cs
- WebHttpBindingElement.cs
- HwndTarget.cs
- GeometryModel3D.cs
- CompressEmulationStream.cs
- ModuleElement.cs
- CachedPathData.cs
- Slider.cs
- FileCodeGroup.cs
- CanonicalFontFamilyReference.cs
- Vector3DCollectionValueSerializer.cs
- DependencyPropertyDescriptor.cs
- PhysicalFontFamily.cs
- Compiler.cs
- IndependentAnimationStorage.cs
- SetterBase.cs
- X509ChainElement.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- SafeLibraryHandle.cs
- InputElement.cs
- AttachedAnnotationChangedEventArgs.cs
- DataObject.cs
- LinqDataSourceSelectEventArgs.cs
- DataGridItemCollection.cs
- PointAnimationUsingKeyFrames.cs
- webbrowsersite.cs
- DataGridViewLinkCell.cs
- Content.cs
- FileInfo.cs
- XmlSchemaSimpleContentRestriction.cs
- SpeakProgressEventArgs.cs
- EntityAdapter.cs
- XmlSchema.cs
- RangeContentEnumerator.cs
- Subtree.cs
- ToolTip.cs
- WebReferenceOptions.cs
- XmlSchemaSubstitutionGroup.cs
- Rotation3D.cs
- CompoundFileDeflateTransform.cs
- BlurBitmapEffect.cs
- UnsafeNativeMethods.cs
- StringDictionaryEditor.cs
- _SingleItemRequestCache.cs
- XmlAttributeHolder.cs
- WhitespaceRuleLookup.cs
- ExpressionConverter.cs
- ImageIndexConverter.cs
- EntityViewGenerator.cs
- PreviewPageInfo.cs
- FlagsAttribute.cs
- GeneralTransform3DGroup.cs
- DataGridViewCellConverter.cs
- StringHelper.cs
- ContentElementCollection.cs
- FilterFactory.cs
- TextEditorThreadLocalStore.cs
- AllMembershipCondition.cs
- EditorBrowsableAttribute.cs
- CodeExporter.cs
- ServicePointManager.cs
- ByteAnimationUsingKeyFrames.cs
- HandledMouseEvent.cs
- DateTimeFormat.cs
- SqlEnums.cs
- MsmqIntegrationProcessProtocolHandler.cs
- DtrList.cs
- SerialPort.cs
- MultipartContentParser.cs
- File.cs
- XamlTypeMapperSchemaContext.cs
- ipaddressinformationcollection.cs
- AnchoredBlock.cs
- SelectorAutomationPeer.cs
- GridView.cs
- XsdBuildProvider.cs
- EntityDataSourceMemberPath.cs
- ElementAction.cs
- RenamedEventArgs.cs
- DataTrigger.cs
- PeerCredentialElement.cs
- DataSourceHelper.cs
- hresults.cs
- ValidationPropertyAttribute.cs