Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Function.cs
- DocumentPageView.cs
- BeginSelectCardRequest.cs
- ChangeInterceptorAttribute.cs
- EnterpriseServicesHelper.cs
- SymDocumentType.cs
- FlowDocument.cs
- UIElement3DAutomationPeer.cs
- SecurityPermission.cs
- RemotingClientProxy.cs
- RemotingHelper.cs
- TraceUtils.cs
- ProgressBarBrushConverter.cs
- RecognizedWordUnit.cs
- HtmlCommandAdapter.cs
- DrawListViewItemEventArgs.cs
- DesignTimeHTMLTextWriter.cs
- ConfigXmlElement.cs
- ForceCopyBuildProvider.cs
- XmlChildEnumerator.cs
- SeparatorAutomationPeer.cs
- AlternationConverter.cs
- CodeArgumentReferenceExpression.cs
- DataObject.cs
- WindowCollection.cs
- ClientScriptManager.cs
- BindingObserver.cs
- MasterPageBuildProvider.cs
- TypeBuilder.cs
- SemanticResultKey.cs
- SqlAggregateChecker.cs
- SchemaMapping.cs
- XmlNodeWriter.cs
- Comparer.cs
- CompilationLock.cs
- Sequence.cs
- LeafCellTreeNode.cs
- SqlServer2KCompatibilityAnnotation.cs
- SchemaSetCompiler.cs
- RedirectionProxy.cs
- NonSerializedAttribute.cs
- StatusBar.cs
- VisualStyleElement.cs
- ReferenceEqualityComparer.cs
- UnionExpr.cs
- InstanceLockedException.cs
- ChildChangedEventArgs.cs
- CodeCompileUnit.cs
- QilCloneVisitor.cs
- HttpBrowserCapabilitiesBase.cs
- BulletedListEventArgs.cs
- DesignColumn.cs
- MetadataCache.cs
- ManipulationLogic.cs
- DecimalConverter.cs
- ScrollViewerAutomationPeer.cs
- EventMap.cs
- MaterializeFromAtom.cs
- CollectionBuilder.cs
- CommandConverter.cs
- QilList.cs
- SuppressIldasmAttribute.cs
- SevenBitStream.cs
- RichTextBoxConstants.cs
- Root.cs
- OperandQuery.cs
- AffineTransform3D.cs
- HttpModuleActionCollection.cs
- BaseAddressPrefixFilterElementCollection.cs
- SimpleBitVector32.cs
- _ProxyRegBlob.cs
- OleDbConnection.cs
- WebServiceMethodData.cs
- ConfigurationFileMap.cs
- PersonalizationDictionary.cs
- FormViewPagerRow.cs
- DictionaryBase.cs
- TCPClient.cs
- EventLogPermissionEntryCollection.cs
- ClientRoleProvider.cs
- SpecularMaterial.cs
- CodeAttributeDeclarationCollection.cs
- XamlDesignerSerializationManager.cs
- _Connection.cs
- UpdateTracker.cs
- BufferModesCollection.cs
- HtmlButton.cs
- DataRecordInfo.cs
- PromptBuilder.cs
- PageContentAsyncResult.cs
- QueryInterceptorAttribute.cs
- InputReportEventArgs.cs
- ProxyManager.cs
- TextControlDesigner.cs
- COM2Properties.cs
- ToolboxBitmapAttribute.cs
- RelationshipConverter.cs
- UriTemplateEquivalenceComparer.cs
- XmlWriter.cs
- RuleRefElement.cs