Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ContentPlaceHolder.cs
- MatrixTransform.cs
- PolyBezierSegmentFigureLogic.cs
- ColorMap.cs
- Screen.cs
- ImportCatalogPart.cs
- CachedPathData.cs
- FreezableDefaultValueFactory.cs
- SQLGuid.cs
- XmlToDatasetMap.cs
- BlockCollection.cs
- HttpProfileGroupBase.cs
- TryExpression.cs
- DataGridViewDataErrorEventArgs.cs
- StringUtil.cs
- TCPListener.cs
- XslTransform.cs
- HandleScope.cs
- StrongNameKeyPair.cs
- SchemeSettingElement.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- XmlSchemaValidationException.cs
- ToolStripDropDownItemDesigner.cs
- PersistenceParticipant.cs
- DesignRelationCollection.cs
- SchemaMapping.cs
- WebSysDisplayNameAttribute.cs
- CalendarModeChangedEventArgs.cs
- EmptyCollection.cs
- WindowsFormsSynchronizationContext.cs
- TransformerConfigurationWizardBase.cs
- ContractUtils.cs
- Base64Encoding.cs
- XmlLinkedNode.cs
- MethodImplAttribute.cs
- _SafeNetHandles.cs
- ModelMemberCollection.cs
- UnsafeNativeMethods.cs
- GridPatternIdentifiers.cs
- XmlTypeMapping.cs
- AutomationPeer.cs
- ItemCollection.cs
- sitestring.cs
- ApplicationGesture.cs
- MutableAssemblyCacheEntry.cs
- CryptoHelper.cs
- ValidatingReaderNodeData.cs
- FacetDescriptionElement.cs
- TableLayoutPanelCellPosition.cs
- XmlBinaryReaderSession.cs
- GroupJoinQueryOperator.cs
- BuildProvidersCompiler.cs
- PackagingUtilities.cs
- RequestChannelBinder.cs
- WebPartHelpVerb.cs
- ParallelEnumerable.cs
- ListBoxItem.cs
- CodeGeneratorOptions.cs
- FontUnit.cs
- SiteMapNodeCollection.cs
- Clipboard.cs
- DesignOnlyAttribute.cs
- X509Utils.cs
- StorageFunctionMapping.cs
- TitleStyle.cs
- ComponentDesigner.cs
- XmlUtil.cs
- DbParameterHelper.cs
- SqlConnectionHelper.cs
- DateTimeUtil.cs
- MulticastDelegate.cs
- EDesignUtil.cs
- CompositeFontParser.cs
- ExtensibleClassFactory.cs
- StreamingContext.cs
- QilXmlReader.cs
- RequestCachePolicyConverter.cs
- DebugView.cs
- ButtonChrome.cs
- FusionWrap.cs
- DataColumnChangeEvent.cs
- BamlRecordHelper.cs
- StreamWithDictionary.cs
- OutputCacheModule.cs
- CacheModeConverter.cs
- WaitHandle.cs
- FunctionParameter.cs
- Main.cs
- Byte.cs
- SerialReceived.cs
- FileDialog_Vista_Interop.cs
- SimplePropertyEntry.cs
- DynamicQueryStringParameter.cs
- AccessDataSource.cs
- XmlAnyElementAttributes.cs
- StorageAssociationSetMapping.cs
- COM2ComponentEditor.cs
- formatstringdialog.cs
- RegexBoyerMoore.cs
- HtmlTableRowCollection.cs