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
- DecimalAnimation.cs
- MasterPageParser.cs
- GroupBox.cs
- Point3DCollection.cs
- TdsRecordBufferSetter.cs
- EventEntry.cs
- SmiMetaDataProperty.cs
- DisposableCollectionWrapper.cs
- StrokeNodeData.cs
- PrintPreviewGraphics.cs
- GridViewColumnHeader.cs
- Int32Rect.cs
- TextSelectionHighlightLayer.cs
- DesignTimeParseData.cs
- DataControlImageButton.cs
- FileDialogCustomPlace.cs
- DataGridViewColumnStateChangedEventArgs.cs
- SessionEndedEventArgs.cs
- TableLayoutPanelBehavior.cs
- SessionIDManager.cs
- FileDataSource.cs
- RectangleF.cs
- util.cs
- CreatingCookieEventArgs.cs
- LockCookie.cs
- HierarchicalDataBoundControlAdapter.cs
- InkCanvasInnerCanvas.cs
- SmtpNtlmAuthenticationModule.cs
- DeclarativeCatalogPartDesigner.cs
- ListDictionary.cs
- Permission.cs
- TreeViewItem.cs
- CacheChildrenQuery.cs
- OdbcErrorCollection.cs
- ReadOnlyDataSource.cs
- SiteMapNodeItemEventArgs.cs
- XmlTextReaderImpl.cs
- ResourcePool.cs
- TextFormatterImp.cs
- HtmlTableCell.cs
- WebPartVerb.cs
- ProxyWebPart.cs
- TreeViewHitTestInfo.cs
- RoleGroup.cs
- RegexInterpreter.cs
- DataTableMappingCollection.cs
- PerspectiveCamera.cs
- AdornerLayer.cs
- PropertyEmitter.cs
- RbTree.cs
- ContextCorrelationInitializer.cs
- ISCIIEncoding.cs
- TraceFilter.cs
- EdgeProfileValidation.cs
- ObjectQueryState.cs
- Range.cs
- TypeValidationEventArgs.cs
- SimpleBitVector32.cs
- Enum.cs
- WebPartDisplayModeEventArgs.cs
- ISessionStateStore.cs
- ILGenerator.cs
- RecordsAffectedEventArgs.cs
- GPPOINTF.cs
- ClonableStack.cs
- ThreadStartException.cs
- WorkflowInspectionServices.cs
- CompositeFontInfo.cs
- MsmqHostedTransportConfiguration.cs
- ConsumerConnectionPointCollection.cs
- ErrorHandler.cs
- NumericExpr.cs
- ImageCollectionEditor.cs
- ForeignKeyConstraint.cs
- CookieHandler.cs
- TypeDependencyAttribute.cs
- TextFormattingConverter.cs
- DocumentPage.cs
- FontEmbeddingManager.cs
- WebPartRestoreVerb.cs
- InstanceData.cs
- _FixedSizeReader.cs
- HttpContext.cs
- sqlpipe.cs
- ViewPort3D.cs
- HttpModulesSection.cs
- DataGridViewCellValidatingEventArgs.cs
- FactoryId.cs
- HttpModuleCollection.cs
- PassportAuthenticationModule.cs
- DataContractSerializerOperationGenerator.cs
- Separator.cs
- ApplyHostConfigurationBehavior.cs
- TextServicesManager.cs
- ServiceDocumentFormatter.cs
- StrokeFIndices.cs
- CodeDOMProvider.cs
- TextRunCache.cs
- sitestring.cs
- SqlInfoMessageEvent.cs