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
- QilNode.cs
- ImageDrawing.cs
- SrgsElementList.cs
- IntegerCollectionEditor.cs
- AutoResizedEvent.cs
- Point3DConverter.cs
- PersonalizationStateQuery.cs
- ListMarkerSourceInfo.cs
- HttpDictionary.cs
- ServiceCredentialsElement.cs
- DataGridViewColumnCollectionEditor.cs
- EncoderParameter.cs
- StreamUpgradeProvider.cs
- TitleStyle.cs
- objectquery_tresulttype.cs
- PointValueSerializer.cs
- ImageUrlEditor.cs
- NavigationEventArgs.cs
- TogglePatternIdentifiers.cs
- RelOps.cs
- FormViewDeleteEventArgs.cs
- ValueUnavailableException.cs
- Preprocessor.cs
- Geometry.cs
- ProgressChangedEventArgs.cs
- HttpCapabilitiesEvaluator.cs
- XmlQueryOutput.cs
- SqlConnectionHelper.cs
- GacUtil.cs
- CustomErrorsSectionWrapper.cs
- ToolStripItemBehavior.cs
- ApplicationContext.cs
- ExtensionQuery.cs
- DBCommandBuilder.cs
- AsymmetricCryptoHandle.cs
- ResolvedKeyFrameEntry.cs
- RectAnimationUsingKeyFrames.cs
- TextDecorationLocationValidation.cs
- ComponentEditorPage.cs
- ToolboxComponentsCreatedEventArgs.cs
- EntityDataSourceWrapperCollection.cs
- XmlCodeExporter.cs
- Triplet.cs
- ColorInterpolationModeValidation.cs
- TextParagraphCache.cs
- DelegateSerializationHolder.cs
- ClientSettingsSection.cs
- COM2PictureConverter.cs
- SqlRewriteScalarSubqueries.cs
- JavaScriptObjectDeserializer.cs
- StringBlob.cs
- RangeValueProviderWrapper.cs
- DesignerResources.cs
- BrowserCapabilitiesFactoryBase.cs
- CodePropertyReferenceExpression.cs
- MDIControlStrip.cs
- XmlExceptionHelper.cs
- ButtonFlatAdapter.cs
- HttpCachePolicyElement.cs
- XPathArrayIterator.cs
- RightsManagementEncryptedStream.cs
- XmlText.cs
- PersonalizationProviderCollection.cs
- ObjectViewFactory.cs
- ExceptionHandlers.cs
- BatchParser.cs
- SoapCodeExporter.cs
- WindowsTitleBar.cs
- CommandBindingCollection.cs
- XmlSchemaSimpleContent.cs
- DriveNotFoundException.cs
- Model3D.cs
- HyperLinkColumn.cs
- AuthorizationSection.cs
- DrawingGroupDrawingContext.cs
- ReverseQueryOperator.cs
- LineGeometry.cs
- JoinTreeSlot.cs
- COM2Properties.cs
- RepeaterItemEventArgs.cs
- OleDbException.cs
- CommandDevice.cs
- EndOfStreamException.cs
- Cursor.cs
- HttpCachePolicyBase.cs
- TimeStampChecker.cs
- SystemColors.cs
- WebConfigurationHost.cs
- DoneReceivingAsyncResult.cs
- EdmPropertyAttribute.cs
- CompilerCollection.cs
- CustomAttributeFormatException.cs
- ResolveMatchesApril2005.cs
- PaperSource.cs
- TextModifier.cs
- ListControlConvertEventArgs.cs
- ResXBuildProvider.cs
- PreservationFileWriter.cs
- ButtonFieldBase.cs
- MediaElement.cs