Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / ResourceReferenceKeyNotFoundException.cs / 1 / ResourceReferenceKeyNotFoundException.cs
//---------------------------------------------------------------------------- // // File: ResourceReferenceExpression.cs // // Description: // A resource could not be found // // Copyright (C) 2005 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Runtime.Serialization; using System.Security; using System.Security.Permissions; namespace System.Windows { ///Exception class for resource reference [Serializable] public class ResourceReferenceKeyNotFoundException: InvalidOperationException { ////// Constructor /// public ResourceReferenceKeyNotFoundException() { _resourceKey = null; } ////// Constructor /// public ResourceReferenceKeyNotFoundException(string message, object resourceKey) : base(message) { _resourceKey = resourceKey; } ////// Constructor (required for Xml web service) /// protected ResourceReferenceKeyNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { _resourceKey = info.GetValue("Key", typeof(object)); } ////// LineNumber that the exception occured on. /// public object Key { get { return _resourceKey; } } ////// Populates a SerializationInfo with the data needed to serialize the target object. /// /// /// The SerializationInfo to populate with data. /// /// /// The destination for this serialization. /// ////// Critical: calls Exception.GetObjectData which LinkDemands /// PublicOK: a demand exists here /// [SecurityCritical] [SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter=true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); info.AddValue("Key", _resourceKey); } private object _resourceKey; } } // 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
- HtmlLink.cs
- Verify.cs
- XPathException.cs
- FixedSOMLineRanges.cs
- Substitution.cs
- TimelineGroup.cs
- ReliableInputConnection.cs
- XmlSerializableWriter.cs
- AddInContractAttribute.cs
- TransactionManager.cs
- WFItemsToSpacerVisibility.cs
- RootBrowserWindowProxy.cs
- RecordsAffectedEventArgs.cs
- OrthographicCamera.cs
- TextEditorDragDrop.cs
- FormViewUpdatedEventArgs.cs
- EdmEntityTypeAttribute.cs
- WebPartTracker.cs
- AttributeAction.cs
- Compiler.cs
- Binding.cs
- lengthconverter.cs
- CreateParams.cs
- RectangleF.cs
- ConfigurationProperty.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- BindingMemberInfo.cs
- FacetDescription.cs
- ExecutionEngineException.cs
- KoreanLunisolarCalendar.cs
- Visual3D.cs
- UIPropertyMetadata.cs
- TypeSystemProvider.cs
- PenContexts.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- BezierSegment.cs
- SafeHandles.cs
- TemplateControl.cs
- PowerModeChangedEventArgs.cs
- HttpGetProtocolReflector.cs
- ListViewCommandEventArgs.cs
- CachedBitmap.cs
- SafeEventLogWriteHandle.cs
- XamlTypeMapper.cs
- ComponentCommands.cs
- RestHandlerFactory.cs
- GetCryptoTransformRequest.cs
- ContentPresenter.cs
- X509SecurityToken.cs
- ExpressionBuilder.cs
- basenumberconverter.cs
- CompleteWizardStep.cs
- SessionStateContainer.cs
- SchemaObjectWriter.cs
- EntitySqlQueryState.cs
- IgnoreFlushAndCloseStream.cs
- _Events.cs
- FixedHighlight.cs
- DisplayInformation.cs
- Set.cs
- RotateTransform.cs
- XmlSecureResolver.cs
- VirtualPathProvider.cs
- ConnectionOrientedTransportChannelFactory.cs
- ScrollItemPatternIdentifiers.cs
- FlowDocument.cs
- CrossContextChannel.cs
- CompiledAction.cs
- ListItemCollection.cs
- ScriptResourceInfo.cs
- XmlSchemaSimpleContentExtension.cs
- LogicalExpressionEditor.cs
- ResourceManager.cs
- MinimizableAttributeTypeConverter.cs
- UnsupportedPolicyOptionsException.cs
- IndexerNameAttribute.cs
- tooltip.cs
- EventLogPermission.cs
- ApplicationGesture.cs
- ResourcePermissionBase.cs
- ProfileService.cs
- Variant.cs
- WeakRefEnumerator.cs
- WebBrowserContainer.cs
- FormatConvertedBitmap.cs
- TCPListener.cs
- NameValuePermission.cs
- ConfigurationLockCollection.cs
- ResolveNameEventArgs.cs
- SimplePropertyEntry.cs
- CachedCompositeFamily.cs
- LogLogRecordHeader.cs
- MarkupCompiler.cs
- ScrollProperties.cs
- SqlMultiplexer.cs
- SafeNativeMethods.cs
- DragDeltaEventArgs.cs
- ModuleBuilderData.cs
- TabControlAutomationPeer.cs
- FrameworkTemplate.cs