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
- FindCriteria11.cs
- ToolStripLocationCancelEventArgs.cs
- PointAnimationClockResource.cs
- BinaryMethodMessage.cs
- SupportingTokenSecurityTokenResolver.cs
- FilterException.cs
- CancellationHandler.cs
- RoleManagerSection.cs
- XmlRawWriterWrapper.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- ImageSourceTypeConverter.cs
- Context.cs
- BitmapEffectRenderDataResource.cs
- StyleXamlParser.cs
- PresentationAppDomainManager.cs
- RootBrowserWindowAutomationPeer.cs
- CommentEmitter.cs
- ResourceExpressionEditorSheet.cs
- ConnectionProviderAttribute.cs
- ClientConfigPaths.cs
- OdbcException.cs
- Parsers.cs
- ProfileModule.cs
- OpenTypeLayoutCache.cs
- NativeWindow.cs
- MediaTimeline.cs
- ProtocolImporter.cs
- StructuredType.cs
- ExpressionBuilderCollection.cs
- AppDomainAttributes.cs
- FormatVersion.cs
- PropertyTabChangedEvent.cs
- SlipBehavior.cs
- cache.cs
- TableColumnCollectionInternal.cs
- ControlPager.cs
- ComEventsHelper.cs
- PathGeometry.cs
- XmlWhitespace.cs
- ReadOnlyMetadataCollection.cs
- OutputScope.cs
- DocumentReferenceCollection.cs
- NativeMethods.cs
- PixelFormats.cs
- FormViewModeEventArgs.cs
- TimeZoneNotFoundException.cs
- Shape.cs
- MetaColumn.cs
- SemaphoreFullException.cs
- Visual3DCollection.cs
- QueryContinueDragEvent.cs
- OdbcError.cs
- ComponentEditorPage.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- HebrewCalendar.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- SqlConnectionHelper.cs
- BuildProvider.cs
- DynamicPropertyHolder.cs
- SafeThemeHandle.cs
- ErasingStroke.cs
- ByteAnimation.cs
- basemetadatamappingvisitor.cs
- Configuration.cs
- LinkGrep.cs
- TransformDescriptor.cs
- TextEditorTables.cs
- InertiaTranslationBehavior.cs
- DataGridPreparingCellForEditEventArgs.cs
- UrlMappingsModule.cs
- StatusBarPanel.cs
- XmlQualifiedName.cs
- XmlEventCache.cs
- ExtendedPropertyCollection.cs
- BadImageFormatException.cs
- DataServiceRequestException.cs
- MouseActionConverter.cs
- KeyValuePairs.cs
- UidManager.cs
- RuntimeArgumentHandle.cs
- TextBox.cs
- SoundPlayer.cs
- EpmTargetPathSegment.cs
- KeyProperty.cs
- ImageList.cs
- BamlWriter.cs
- EntityDataReader.cs
- DragStartedEventArgs.cs
- ColorInterpolationModeValidation.cs
- ConstantSlot.cs
- Byte.cs
- ScriptResourceHandler.cs
- EntitySet.cs
- CompositionDesigner.cs
- XslTransform.cs
- ClientFormsIdentity.cs
- ReservationCollection.cs
- Ops.cs
- ChannelSinkStacks.cs
- RtfFormatStack.cs