Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / 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. //---------------------------------------------------------------------------- // // 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
- Tracer.cs
- Control.cs
- UrlMappingsSection.cs
- AssemblyCollection.cs
- ProgressBarRenderer.cs
- AliasedSlot.cs
- XamlRtfConverter.cs
- WindowAutomationPeer.cs
- FileFormatException.cs
- DesignColumnCollection.cs
- ArgumentException.cs
- WebPartDescriptionCollection.cs
- SourceItem.cs
- CompilerWrapper.cs
- MarkupObject.cs
- ActivityExecutorSurrogate.cs
- ErrorStyle.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ContentPropertyAttribute.cs
- XNodeValidator.cs
- SqlProfileProvider.cs
- TypeInitializationException.cs
- ScrollViewerAutomationPeer.cs
- PropertyEmitterBase.cs
- XmlHelper.cs
- BitmapFrame.cs
- NativeMethodsCLR.cs
- CheckBoxDesigner.cs
- HyperLinkColumn.cs
- ReachPageContentCollectionSerializerAsync.cs
- webbrowsersite.cs
- DesignRelationCollection.cs
- XPathNodeIterator.cs
- ArrayWithOffset.cs
- File.cs
- TagMapInfo.cs
- ReaderOutput.cs
- Formatter.cs
- XmlDataDocument.cs
- Empty.cs
- ActiveDesignSurfaceEvent.cs
- OrderByBuilder.cs
- ProfileManager.cs
- SystemIPAddressInformation.cs
- ConfigsHelper.cs
- _SSPIWrapper.cs
- MediaTimeline.cs
- XmlSchemaException.cs
- SchemaImporterExtensionsSection.cs
- SemanticTag.cs
- ExpressionBindingCollection.cs
- DataGridViewColumnDesigner.cs
- InvalidProgramException.cs
- TemplateComponentConnector.cs
- GridViewColumnHeader.cs
- StringUtil.cs
- iisPickupDirectory.cs
- VectorValueSerializer.cs
- RowUpdatedEventArgs.cs
- PartitionResolver.cs
- ZipArchive.cs
- TypeSemantics.cs
- LinkConverter.cs
- StringToken.cs
- DynamicDiscoSearcher.cs
- ModelFunctionTypeElement.cs
- PresentationAppDomainManager.cs
- RSAPKCS1KeyExchangeFormatter.cs
- BinHexEncoder.cs
- SrgsSubset.cs
- TreeChangeInfo.cs
- XmlSchemaAll.cs
- X509CertificateTrustedIssuerElementCollection.cs
- ControllableStoryboardAction.cs
- DynamicDocumentPaginator.cs
- ParameterReplacerVisitor.cs
- TableLayoutColumnStyleCollection.cs
- System.Data_BID.cs
- XmlAggregates.cs
- SchemaNamespaceManager.cs
- CatalogPartChrome.cs
- IgnorePropertiesAttribute.cs
- QueryOperationResponseOfT.cs
- BitmapData.cs
- srgsitem.cs
- ApplicationDirectory.cs
- PathFigureCollectionConverter.cs
- RenderOptions.cs
- HostProtectionPermission.cs
- MemoryStream.cs
- InputLangChangeRequestEvent.cs
- TriState.cs
- Operators.cs
- ModifierKeysValueSerializer.cs
- PropertyDescriptor.cs
- ByteAnimationUsingKeyFrames.cs
- JumpPath.cs
- RunClient.cs
- ValidationSummary.cs
- WebPartConnectionsDisconnectVerb.cs