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
- BinHexEncoder.cs
- TimerEventSubscription.cs
- MinimizableAttributeTypeConverter.cs
- Region.cs
- TableParaClient.cs
- TreeViewItemAutomationPeer.cs
- StringAnimationBase.cs
- CompareValidator.cs
- XmlReaderDelegator.cs
- UITypeEditor.cs
- GenericUriParser.cs
- InertiaTranslationBehavior.cs
- DocumentPageHost.cs
- Metadata.cs
- BaseTemplateParser.cs
- ListViewDeleteEventArgs.cs
- CaseExpr.cs
- PropertiesTab.cs
- Point4DConverter.cs
- SimpleLine.cs
- Currency.cs
- XmlSchemaComplexContentExtension.cs
- RenderOptions.cs
- XPathPatternParser.cs
- ControlCachePolicy.cs
- XmlNotation.cs
- ContainerUIElement3D.cs
- TextTabProperties.cs
- HttpCachePolicy.cs
- CodeRemoveEventStatement.cs
- SamlEvidence.cs
- MissingMemberException.cs
- COM2ColorConverter.cs
- CommentEmitter.cs
- LeaseManager.cs
- ProfileGroupSettingsCollection.cs
- DataBoundControlDesigner.cs
- TabControlEvent.cs
- TaiwanLunisolarCalendar.cs
- ValidationVisibilityAttribute.cs
- UnmanagedMarshal.cs
- CapacityStreamGeometryContext.cs
- SoapAttributeOverrides.cs
- CurrencyManager.cs
- DeploymentSection.cs
- MdImport.cs
- ControlAdapter.cs
- SmtpFailedRecipientsException.cs
- Type.cs
- FileDialogPermission.cs
- XmlDataDocument.cs
- Evaluator.cs
- RadioButtonBaseAdapter.cs
- Msec.cs
- Mappings.cs
- X509Chain.cs
- DbParameterHelper.cs
- SchemaImporter.cs
- AtomMaterializerLog.cs
- Attribute.cs
- NativeWindow.cs
- ApplicationSecurityInfo.cs
- _HTTPDateParse.cs
- ValueProviderWrapper.cs
- ManipulationVelocities.cs
- WebColorConverter.cs
- UserControl.cs
- MultipartIdentifier.cs
- documentsequencetextview.cs
- DataSvcMapFileSerializer.cs
- QuadraticBezierSegment.cs
- InstalledFontCollection.cs
- CompletedAsyncResult.cs
- Panel.cs
- PartBasedPackageProperties.cs
- DataKey.cs
- TypeConverterAttribute.cs
- GradientSpreadMethodValidation.cs
- DbSourceParameterCollection.cs
- ArrayWithOffset.cs
- TCPClient.cs
- BadImageFormatException.cs
- ResizingMessageFilter.cs
- _NativeSSPI.cs
- DataGridViewCellStateChangedEventArgs.cs
- RepeaterItem.cs
- BinaryReader.cs
- SQLDateTime.cs
- AsymmetricAlgorithm.cs
- Label.cs
- DBConnection.cs
- WindowsTreeView.cs
- Calendar.cs
- SafeWaitHandle.cs
- InputScopeAttribute.cs
- HtmlMeta.cs
- ObjectDataSourceView.cs
- SessionStateItemCollection.cs
- PartitionResolver.cs
- OdbcConnectionString.cs