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
- ResetableIterator.cs
- BitmapImage.cs
- CustomExpression.cs
- Slider.cs
- SqlUserDefinedTypeAttribute.cs
- HttpCookieCollection.cs
- EventPropertyMap.cs
- WithParamAction.cs
- AlphabeticalEnumConverter.cs
- GacUtil.cs
- IdentityReference.cs
- EndpointDiscoveryBehavior.cs
- KeyFrames.cs
- LazyTextWriterCreator.cs
- _UncName.cs
- ErrorFormatter.cs
- ExternalFile.cs
- HtmlButton.cs
- ReferencedType.cs
- PageStatePersister.cs
- querybuilder.cs
- SecurityUtils.cs
- EventKeyword.cs
- PeerNameRecordCollection.cs
- EditingScope.cs
- OptimalBreakSession.cs
- MultiAsyncResult.cs
- FontFamily.cs
- MenuEventArgs.cs
- ErrorFormatter.cs
- SR.cs
- SQLResource.cs
- StorageInfo.cs
- TemplateManager.cs
- BindingValueChangedEventArgs.cs
- nulltextcontainer.cs
- TextViewBase.cs
- Logging.cs
- PointLightBase.cs
- DrawingAttributesDefaultValueFactory.cs
- BackEase.cs
- ClientRoleProvider.cs
- WebPartManager.cs
- DebuggerAttributes.cs
- RoutedEventArgs.cs
- FilteredDataSetHelper.cs
- PipelineModuleStepContainer.cs
- Vector3DAnimationBase.cs
- LineServicesCallbacks.cs
- BamlRecordHelper.cs
- HttpHandlersSection.cs
- AmbientLight.cs
- XmlAttributeCollection.cs
- JavaScriptSerializer.cs
- ScrollData.cs
- XmlWrappingReader.cs
- PropertyFilterAttribute.cs
- CollectionTraceRecord.cs
- ReflectTypeDescriptionProvider.cs
- EventEntry.cs
- VisualBasicSettingsHandler.cs
- CompilationUtil.cs
- SortDescriptionCollection.cs
- HtmlSelect.cs
- EntityException.cs
- MdiWindowListStrip.cs
- GridViewSortEventArgs.cs
- SystemColors.cs
- BitConverter.cs
- WebConfigurationHost.cs
- VisualStyleInformation.cs
- Polyline.cs
- documentsequencetextview.cs
- Transactions.cs
- GridViewSortEventArgs.cs
- FontSizeConverter.cs
- ListSourceHelper.cs
- WebPartConnectionCollection.cs
- ObsoleteAttribute.cs
- DataGridViewSortCompareEventArgs.cs
- HMACSHA256.cs
- DataServiceHost.cs
- DecimalAnimationUsingKeyFrames.cs
- Helpers.cs
- ErrorHandlerModule.cs
- TargetException.cs
- RenderData.cs
- ServiceMetadataBehavior.cs
- HotCommands.cs
- TemplateXamlParser.cs
- Timer.cs
- XmlDigitalSignatureProcessor.cs
- CallInfo.cs
- Utilities.cs
- StructuredProperty.cs
- Int32RectValueSerializer.cs
- Point4D.cs
- ExpressionConverter.cs
- MessagePropertyFilter.cs
- DateTimeOffset.cs