Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- BuildManagerHost.cs
- LocatorManager.cs
- BodyWriter.cs
- SecurityException.cs
- MetadataItemEmitter.cs
- KeyValueConfigurationElement.cs
- TextBoxBase.cs
- PathFigureCollection.cs
- LoadedOrUnloadedOperation.cs
- XmlNavigatorStack.cs
- DocumentSchemaValidator.cs
- Int64Animation.cs
- StateInitialization.cs
- GlobalProxySelection.cs
- FillRuleValidation.cs
- TraceContextRecord.cs
- EventMap.cs
- StreamResourceInfo.cs
- SchemaObjectWriter.cs
- XamlSerializationHelper.cs
- ThicknessConverter.cs
- SQLConvert.cs
- ListBoxItemAutomationPeer.cs
- SoapSchemaImporter.cs
- Pair.cs
- AggregateNode.cs
- CryptoApi.cs
- NameScope.cs
- DrawListViewSubItemEventArgs.cs
- ellipse.cs
- TlsnegoTokenAuthenticator.cs
- ICspAsymmetricAlgorithm.cs
- OutputCacheProfile.cs
- Context.cs
- EntityClientCacheKey.cs
- BufferedGraphics.cs
- DBConnectionString.cs
- QuaternionAnimation.cs
- CmsInterop.cs
- IndentedWriter.cs
- HostedBindingBehavior.cs
- BitmapScalingModeValidation.cs
- Int64.cs
- LogicalExpr.cs
- DateBoldEvent.cs
- StorageEntityTypeMapping.cs
- ActivationArguments.cs
- SQLRoleProvider.cs
- RSAOAEPKeyExchangeFormatter.cs
- JournalEntry.cs
- UriTemplateVariablePathSegment.cs
- DocumentApplicationDocumentViewer.cs
- FacetEnabledSchemaElement.cs
- InternalException.cs
- ReflectTypeDescriptionProvider.cs
- controlskin.cs
- DebugView.cs
- EntityStoreSchemaGenerator.cs
- CellPartitioner.cs
- DrawListViewSubItemEventArgs.cs
- SessionStateSection.cs
- TrackingProfileDeserializationException.cs
- DebuggerAttributes.cs
- SqlStatistics.cs
- SectionInformation.cs
- RetriableClipboard.cs
- TrackingProfileManager.cs
- ContextBase.cs
- CatalogZoneBase.cs
- XPathBuilder.cs
- UIElement3D.cs
- Imaging.cs
- GridViewDeletedEventArgs.cs
- ProviderSettings.cs
- AnnotationHighlightLayer.cs
- PersonalizationStateInfoCollection.cs
- UseManagedPresentationElement.cs
- graph.cs
- WebServiceAttribute.cs
- ListViewDataItem.cs
- HttpRuntime.cs
- IndentedWriter.cs
- XmlIgnoreAttribute.cs
- DBDataPermission.cs
- Baml6Assembly.cs
- GeneralTransform2DTo3DTo2D.cs
- DataGridColumnFloatingHeader.cs
- CertificateManager.cs
- Rect3DValueSerializer.cs
- UnsafeMethods.cs
- DynamicQueryableWrapper.cs
- ValueConversionAttribute.cs
- EventLogWatcher.cs
- UrlPath.cs
- HtmlInputPassword.cs
- MasterPageParser.cs
- PackWebResponse.cs
- StringSource.cs
- StateManagedCollection.cs
- ApplicationSecurityManager.cs