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
- _UriTypeConverter.cs
- WebConfigurationHost.cs
- UserMapPath.cs
- UInt16.cs
- ServiceAuthorizationElement.cs
- QilReplaceVisitor.cs
- FilteredXmlReader.cs
- ObjRef.cs
- QuaternionAnimation.cs
- PermissionListSet.cs
- ToolBar.cs
- CodeMethodReturnStatement.cs
- Invariant.cs
- __ConsoleStream.cs
- IndentTextWriter.cs
- DependencyProperty.cs
- RedBlackList.cs
- PackageFilter.cs
- ToolBar.cs
- DbDataAdapter.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- CuspData.cs
- TokenCreationParameter.cs
- SmiContextFactory.cs
- ObjectListComponentEditor.cs
- GlobalItem.cs
- EntityContainer.cs
- DocumentXmlWriter.cs
- Unit.cs
- XmlBufferedByteStreamReader.cs
- BitmapEditor.cs
- HttpCookiesSection.cs
- TreeBuilder.cs
- BitmapPalette.cs
- VectorConverter.cs
- BufferModesCollection.cs
- PartBasedPackageProperties.cs
- VolatileEnlistmentState.cs
- RowBinding.cs
- ConnectionProviderAttribute.cs
- SqlUtils.cs
- LocalizationCodeDomSerializer.cs
- DbTransaction.cs
- ErrorStyle.cs
- QuaternionKeyFrameCollection.cs
- XmlNodeChangedEventManager.cs
- StandardCommands.cs
- TextureBrush.cs
- PolyBezierSegment.cs
- Config.cs
- TdsParserStaticMethods.cs
- CompilationRelaxations.cs
- EnglishPluralizationService.cs
- SqlMethods.cs
- AbstractExpressions.cs
- ScrollProviderWrapper.cs
- ContextQuery.cs
- StrokeCollection2.cs
- QuaternionAnimation.cs
- ZoomPercentageConverter.cs
- BatchServiceHost.cs
- XamlDesignerSerializationManager.cs
- GridSplitter.cs
- RootAction.cs
- StylusSystemGestureEventArgs.cs
- BitmapPalette.cs
- PrincipalPermissionMode.cs
- PingOptions.cs
- HttpHandler.cs
- Cursors.cs
- DbParameterHelper.cs
- SessionEndingCancelEventArgs.cs
- DataControlReferenceCollection.cs
- SeekableReadStream.cs
- WebBrowserHelper.cs
- XmlReflectionMember.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- WaitHandleCannotBeOpenedException.cs
- SmtpReplyReaderFactory.cs
- XmlTypeAttribute.cs
- ServiceContractGenerationContext.cs
- WebEventTraceProvider.cs
- CategoryNameCollection.cs
- XmlSchemaSet.cs
- SrgsElementFactoryCompiler.cs
- Int32CAMarshaler.cs
- Vector.cs
- FormParameter.cs
- SByteStorage.cs
- OdbcConnectionPoolProviderInfo.cs
- ItemContainerProviderWrapper.cs
- DefaultPropertiesToSend.cs
- KeyValueSerializer.cs
- ISCIIEncoding.cs
- Knowncolors.cs
- SingleAnimation.cs
- SafeReadContext.cs
- SubMenuStyle.cs
- TableLayoutPanel.cs
- Panel.cs