Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / ResourceReferenceKeyNotFoundException.cs / 1305600 / 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
- CollectionChangedEventManager.cs
- TokenizerHelper.cs
- ScriptResourceHandler.cs
- KeyboardEventArgs.cs
- XomlCompilerResults.cs
- HandlerMappingMemo.cs
- ConfigPathUtility.cs
- CommonEndpointBehaviorElement.cs
- SafeCancelMibChangeNotify.cs
- GridViewItemAutomationPeer.cs
- Label.cs
- XmlSchemaGroupRef.cs
- XmlSerializerAssemblyAttribute.cs
- OleTxTransaction.cs
- CaretElement.cs
- GeneralTransform3DTo2D.cs
- Transaction.cs
- Int16.cs
- StaticTextPointer.cs
- DataServiceExpressionVisitor.cs
- Transform3D.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- DynamicILGenerator.cs
- DefaultValueAttribute.cs
- InputManager.cs
- SmtpFailedRecipientsException.cs
- SignatureGenerator.cs
- DataDocumentXPathNavigator.cs
- XmlSchemaProviderAttribute.cs
- TextDecorationCollection.cs
- InvalidWMPVersionException.cs
- SecurityTokenException.cs
- PlainXmlDeserializer.cs
- UnionExpr.cs
- PolicyManager.cs
- SiteMapNodeItemEventArgs.cs
- Floater.cs
- UriSection.cs
- IndexingContentUnit.cs
- DataSvcMapFileSerializer.cs
- PrePostDescendentsWalker.cs
- Profiler.cs
- DrawingContextWalker.cs
- ObjectConverter.cs
- MenuItemBindingCollection.cs
- RSAOAEPKeyExchangeDeformatter.cs
- MediaElement.cs
- EventLogRecord.cs
- ContractMapping.cs
- TraceRecord.cs
- DBCommand.cs
- ProcessModule.cs
- BitmapScalingModeValidation.cs
- MbpInfo.cs
- EventLogHandle.cs
- xsdvalidator.cs
- TransformGroup.cs
- ToolStrip.cs
- XmlSerializerVersionAttribute.cs
- LongTypeConverter.cs
- ContextQuery.cs
- DateTimeFormatInfo.cs
- DependencyObjectProvider.cs
- WebPartTransformer.cs
- PropertyInformation.cs
- AppDomainManager.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ThreadPoolTaskScheduler.cs
- MenuItem.cs
- VerificationException.cs
- SqlTypeSystemProvider.cs
- DashStyles.cs
- TextFragmentEngine.cs
- XmlSerializerAssemblyAttribute.cs
- Pair.cs
- Model3D.cs
- path.cs
- Matrix.cs
- HttpHandlerAction.cs
- BeginEvent.cs
- TextDpi.cs
- RangeBase.cs
- AttributeEmitter.cs
- WebAdminConfigurationHelper.cs
- WorkflowOperationBehavior.cs
- IndexedString.cs
- WebDescriptionAttribute.cs
- UpdateCommand.cs
- CommandManager.cs
- ConcatQueryOperator.cs
- SqlDataReader.cs
- Guid.cs
- SchemaImporterExtensionElementCollection.cs
- DictionaryBase.cs
- CharacterHit.cs
- DataGridViewRowHeaderCell.cs
- TempEnvironment.cs
- DataViewSettingCollection.cs
- StaticSiteMapProvider.cs
- OutputCacheSettings.cs