Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectStateFormatter.cs
- CompressedStack.cs
- HttpRequestCacheValidator.cs
- WindowsButton.cs
- PermissionToken.cs
- Lease.cs
- TabletCollection.cs
- CodeSnippetCompileUnit.cs
- RemotingConfigParser.cs
- WebPartConnectVerb.cs
- BulletedList.cs
- EdmToObjectNamespaceMap.cs
- DiscoveryReferences.cs
- QueueProcessor.cs
- RelationshipEndMember.cs
- StringResourceManager.cs
- BitmapPalette.cs
- BitmapSource.cs
- ServiceConfigurationTraceRecord.cs
- WindowsGrip.cs
- XmlEntity.cs
- safesecurityhelperavalon.cs
- WebPartManagerInternals.cs
- ImageButton.cs
- DiscoveryCallbackBehavior.cs
- FillRuleValidation.cs
- NavigationWindow.cs
- Intellisense.cs
- Pair.cs
- Point3DValueSerializer.cs
- XPathDocumentIterator.cs
- Stroke2.cs
- Vector3DKeyFrameCollection.cs
- OperatorExpressions.cs
- ObjectDataProvider.cs
- TagPrefixCollection.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SoapIncludeAttribute.cs
- UTF7Encoding.cs
- ApplicationActivator.cs
- CodeChecksumPragma.cs
- DbConnectionStringCommon.cs
- DbSetClause.cs
- Label.cs
- SchemaDeclBase.cs
- CaseInsensitiveOrdinalStringComparer.cs
- MetadataUtilsSmi.cs
- IndexingContentUnit.cs
- XmlSignificantWhitespace.cs
- DataGridView.cs
- DecoderFallback.cs
- mediaeventargs.cs
- CodeGroup.cs
- ToolCreatedEventArgs.cs
- EntityWrapper.cs
- DashStyles.cs
- CommonProperties.cs
- MenuItemCollection.cs
- DispatcherProcessingDisabled.cs
- DatePickerDateValidationErrorEventArgs.cs
- ApplicationGesture.cs
- WebBrowserEvent.cs
- DesignerTransactionCloseEvent.cs
- IndexerNameAttribute.cs
- ContourSegment.cs
- AsyncPostBackErrorEventArgs.cs
- WebPart.cs
- ValidationResult.cs
- PageStatePersister.cs
- HttpWriter.cs
- DrawingServices.cs
- TypeContext.cs
- CancelEventArgs.cs
- DataGridCaption.cs
- BrowserCapabilitiesCompiler.cs
- SoapObjectInfo.cs
- DashStyles.cs
- ThreadStartException.cs
- GeneralTransform3DTo2DTo3D.cs
- MetaColumn.cs
- RegexCapture.cs
- AuditLogLocation.cs
- XmlAttributeCache.cs
- ExpressionBuilder.cs
- ChooseAction.cs
- SoapWriter.cs
- TdsParameterSetter.cs
- XmlSchemaObjectCollection.cs
- Subtree.cs
- JavaScriptSerializer.cs
- Command.cs
- ExtensionFile.cs
- JoinSymbol.cs
- EditorAttribute.cs
- LazyTextWriterCreator.cs
- SiteOfOriginPart.cs
- EdmRelationshipRoleAttribute.cs
- Vars.cs
- _FixedSizeReader.cs
- RichTextBox.cs