Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ThemeDirectoryCompiler.cs
- XmlDataSourceView.cs
- DSASignatureDeformatter.cs
- MetadataFile.cs
- ChildChangedEventArgs.cs
- ChildDocumentBlock.cs
- StructuralType.cs
- X509Certificate2Collection.cs
- DataGridTable.cs
- GeneralTransform3DTo2DTo3D.cs
- EpmTargetTree.cs
- Decoder.cs
- MetadataItem.cs
- GenericAuthenticationEventArgs.cs
- WinFormsSpinner.cs
- InstanceOwner.cs
- SqlParameterCollection.cs
- DispatchWrapper.cs
- ModelService.cs
- XmlTextReaderImpl.cs
- EmbossBitmapEffect.cs
- WinFormsComponentEditor.cs
- PermissionSet.cs
- UnhandledExceptionEventArgs.cs
- XmlHierarchicalDataSourceView.cs
- TypeToken.cs
- DocumentPageTextView.cs
- _NetRes.cs
- TriggerBase.cs
- DurableInstanceProvider.cs
- RadioButtonPopupAdapter.cs
- CursorConverter.cs
- HtmlLiteralTextAdapter.cs
- DataGridViewColumnCollection.cs
- InplaceBitmapMetadataWriter.cs
- TextEditorThreadLocalStore.cs
- FieldInfo.cs
- UserControl.cs
- XmlCodeExporter.cs
- RegexGroup.cs
- ServicePointManager.cs
- AssociationSetEnd.cs
- XamlTreeBuilderBamlRecordWriter.cs
- _DisconnectOverlappedAsyncResult.cs
- ThreadPool.cs
- UnknownExceptionActionHelper.cs
- DataSetMappper.cs
- CustomTypeDescriptor.cs
- NoPersistScope.cs
- EtwTrackingParticipant.cs
- CompoundFileStreamReference.cs
- hresults.cs
- SortQuery.cs
- Control.cs
- CodeDOMProvider.cs
- PenLineJoinValidation.cs
- CorrelationInitializer.cs
- StickyNoteContentControl.cs
- FrameSecurityDescriptor.cs
- CommandBinding.cs
- AutomationPatternInfo.cs
- InvokeDelegate.cs
- Int32RectConverter.cs
- DataServiceRequestException.cs
- ElementNotAvailableException.cs
- TextRange.cs
- DLinqTableProvider.cs
- AssemblyAttributes.cs
- MachineKeySection.cs
- PropertyChangingEventArgs.cs
- PipelineModuleStepContainer.cs
- ZoomingMessageFilter.cs
- ProfilePropertySettings.cs
- HtmlProps.cs
- IconHelper.cs
- EntityContainer.cs
- RewritingPass.cs
- basecomparevalidator.cs
- ChangeInterceptorAttribute.cs
- DataBoundControl.cs
- BamlLocalizationDictionary.cs
- WebDisplayNameAttribute.cs
- ResolveMatches11.cs
- GetWinFXPath.cs
- StructureChangedEventArgs.cs
- PropertyFilter.cs
- TreePrinter.cs
- HandoffBehavior.cs
- WSUtilitySpecificationVersion.cs
- BindingMAnagerBase.cs
- Bezier.cs
- CustomAttribute.cs
- StateMachine.cs
- ProcessHostServerConfig.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SafeHandles.cs
- PenContexts.cs
- ImageField.cs
- StateItem.cs
- DataGridCheckBoxColumn.cs