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
- SqlMethods.cs
- CompareInfo.cs
- XhtmlConformanceSection.cs
- TimerEventSubscriptionCollection.cs
- WindowsIdentity.cs
- ToolStripSeparatorRenderEventArgs.cs
- SelectionItemPattern.cs
- DataListGeneralPage.cs
- AtlasWeb.Designer.cs
- DataGridViewCheckBoxCell.cs
- Label.cs
- EqualityComparer.cs
- ValidationHelpers.cs
- SqlWebEventProvider.cs
- SettingsAttributeDictionary.cs
- ConvertBinder.cs
- Int64KeyFrameCollection.cs
- FocusManager.cs
- DataRelation.cs
- AssemblyInfo.cs
- SelectedDatesCollection.cs
- UIElementAutomationPeer.cs
- RNGCryptoServiceProvider.cs
- ClassGenerator.cs
- SchemaElementLookUpTable.cs
- ReverseInheritProperty.cs
- Terminate.cs
- AssemblyAttributes.cs
- ReadOnlyDataSource.cs
- StreamInfo.cs
- MessageAction.cs
- ClientScriptManagerWrapper.cs
- VarRefManager.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- PropertyGridDesigner.cs
- EditorPartChrome.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ProviderManager.cs
- XmlDataSourceView.cs
- MessageBox.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- DragSelectionMessageFilter.cs
- AdapterUtil.cs
- SafeNativeMethods.cs
- Vector3DCollectionValueSerializer.cs
- PreviewKeyDownEventArgs.cs
- MessageQueuePermissionEntry.cs
- ScrollItemPattern.cs
- DataObjectMethodAttribute.cs
- StylusShape.cs
- Pointer.cs
- RectangleConverter.cs
- ViewStateModeByIdAttribute.cs
- BufferModeSettings.cs
- StyleCollectionEditor.cs
- Vector3D.cs
- ProjectionCamera.cs
- ReadOnlyAttribute.cs
- CompatibleIComparer.cs
- WSSecurityTokenSerializer.cs
- TextEditorTyping.cs
- PolyBezierSegment.cs
- TraceListener.cs
- BindingMAnagerBase.cs
- HandlerBase.cs
- Expressions.cs
- LinkArea.cs
- RadioButtonList.cs
- HostSecurityManager.cs
- NotImplementedException.cs
- SoapDocumentServiceAttribute.cs
- MethodExpr.cs
- ExtenderProvidedPropertyAttribute.cs
- securitycriticaldataClass.cs
- DesignerRegionCollection.cs
- _HeaderInfo.cs
- QueryOperator.cs
- DependencyPropertyValueSerializer.cs
- ProfessionalColors.cs
- QueryCacheKey.cs
- pingexception.cs
- TransactionInformation.cs
- TraceUtils.cs
- ComponentResourceKeyConverter.cs
- PassportIdentity.cs
- TypeConverterBase.cs
- HtmlWindow.cs
- Rectangle.cs
- ActivationArguments.cs
- ComEventsInfo.cs
- ComplexLine.cs
- UserControlCodeDomTreeGenerator.cs
- TransformGroup.cs
- URI.cs
- ListItemConverter.cs
- XamlToRtfParser.cs
- GetPageNumberCompletedEventArgs.cs
- ListViewSortEventArgs.cs
- ContextMenu.cs
- VirtualPathProvider.cs