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
- FtpWebRequest.cs
- IsolatedStorageFile.cs
- BrowserDefinitionCollection.cs
- NativeWrapper.cs
- OneOfElement.cs
- ToolboxComponentsCreatingEventArgs.cs
- RestHandler.cs
- counter.cs
- Message.cs
- UrlPropertyAttribute.cs
- SecurityContext.cs
- OdbcConnectionPoolProviderInfo.cs
- TypeToken.cs
- RadioButtonPopupAdapter.cs
- CompilerErrorCollection.cs
- RenderDataDrawingContext.cs
- MultiTrigger.cs
- KnownColorTable.cs
- EventLogPermissionAttribute.cs
- GroupBoxRenderer.cs
- EventTrigger.cs
- EntityDataSourceDataSelection.cs
- OleDbPermission.cs
- TokenDescriptor.cs
- MSAAEventDispatcher.cs
- AnnotationResourceCollection.cs
- CatalogPartChrome.cs
- SystemBrushes.cs
- FaultImportOptions.cs
- GroupItemAutomationPeer.cs
- CryptoHelper.cs
- GenericEnumerator.cs
- TextSpanModifier.cs
- ListenerElementsCollection.cs
- SerializerDescriptor.cs
- DeferredReference.cs
- XmlCountingReader.cs
- DrawingServices.cs
- CompilationUtil.cs
- DesignerResources.cs
- PackageRelationshipCollection.cs
- EventDescriptor.cs
- EventProxy.cs
- ConditionalAttribute.cs
- XmlQualifiedName.cs
- FixedTextView.cs
- TouchFrameEventArgs.cs
- ReflectionUtil.cs
- InfoCardServiceInstallComponent.cs
- MemberRelationshipService.cs
- AutomationElementCollection.cs
- SqlBulkCopyColumnMapping.cs
- TextEncodedRawTextWriter.cs
- TypeConverterHelper.cs
- CodeTypeReference.cs
- CursorConverter.cs
- BitmapFrameEncode.cs
- ExecutionContext.cs
- EventHandlerList.cs
- LowerCaseStringConverter.cs
- UInt64.cs
- XPathSingletonIterator.cs
- Function.cs
- TransformedBitmap.cs
- StringResourceManager.cs
- MsmqInputChannelListenerBase.cs
- CutCopyPasteHelper.cs
- GeneralTransform3DTo2DTo3D.cs
- TextBoxAutomationPeer.cs
- WorkflowQueueInfo.cs
- AppDomainProtocolHandler.cs
- IriParsingElement.cs
- FileLevelControlBuilderAttribute.cs
- XamlBrushSerializer.cs
- LoadedEvent.cs
- SqlConnection.cs
- Ipv6Element.cs
- PrintPreviewGraphics.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- FigureHelper.cs
- UrlMappingCollection.cs
- XmlSchemaComplexContent.cs
- RootBrowserWindow.cs
- WebServiceErrorEvent.cs
- compensatingcollection.cs
- ConnectionManagementElement.cs
- SoapException.cs
- ServiceEndpoint.cs
- KerberosRequestorSecurityToken.cs
- ButtonField.cs
- Int64AnimationBase.cs
- PackUriHelper.cs
- WebScriptEndpointElement.cs
- EdmPropertyAttribute.cs
- HtmlFormAdapter.cs
- PropertyDescriptor.cs
- DragDeltaEventArgs.cs
- EntityTypeEmitter.cs
- ColorTransform.cs
- EventLogPermissionEntryCollection.cs