Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- CodeCompiler.cs
- ImageDesigner.cs
- FixedSOMContainer.cs
- ArcSegment.cs
- basecomparevalidator.cs
- TabControl.cs
- SortDescriptionCollection.cs
- QuadraticBezierSegment.cs
- CollectionViewGroup.cs
- Ipv6Element.cs
- MultiBinding.cs
- WindowsRegion.cs
- ObjectItemCollection.cs
- DataGridViewLinkColumn.cs
- IconConverter.cs
- SessionEndingEventArgs.cs
- SpStreamWrapper.cs
- EllipseGeometry.cs
- ConfigXmlDocument.cs
- DescendentsWalker.cs
- RewritingValidator.cs
- ActiveXSite.cs
- EventlogProvider.cs
- TaskFormBase.cs
- HostedAspNetEnvironment.cs
- DbException.cs
- ConfigUtil.cs
- StylusPoint.cs
- MetadataItemCollectionFactory.cs
- UInt32.cs
- Adorner.cs
- FilteredXmlReader.cs
- DataGridParentRows.cs
- PipelineModuleStepContainer.cs
- CardSpaceException.cs
- ISCIIEncoding.cs
- SelectionProcessor.cs
- VisualBrush.cs
- RewritingProcessor.cs
- ResXBuildProvider.cs
- UDPClient.cs
- BindingObserver.cs
- PageHandlerFactory.cs
- LineBreak.cs
- RequestQueue.cs
- UnescapedXmlDiagnosticData.cs
- EntityDataSourceWizardForm.cs
- Properties.cs
- ExpressionConverter.cs
- RegexStringValidator.cs
- SQLInt64.cs
- RtfToXamlReader.cs
- DesignerSerializerAttribute.cs
- StringWriter.cs
- ActiveXHost.cs
- WmlListAdapter.cs
- ClientFormsIdentity.cs
- XsltException.cs
- _LocalDataStoreMgr.cs
- KnownBoxes.cs
- ReverseInheritProperty.cs
- IPAddress.cs
- ErasingStroke.cs
- DispatcherHookEventArgs.cs
- DeflateStream.cs
- wmiprovider.cs
- PageAsyncTask.cs
- ColorConvertedBitmap.cs
- InstanceNameConverter.cs
- Collection.cs
- WsatStrings.cs
- CodeExpressionStatement.cs
- SecureConversationVersion.cs
- DBPropSet.cs
- SqlMetaData.cs
- sqlmetadatafactory.cs
- CryptoProvider.cs
- DataRowCollection.cs
- ThousandthOfEmRealDoubles.cs
- GatewayDefinition.cs
- TargetControlTypeAttribute.cs
- SymLanguageType.cs
- RemoteCryptoDecryptRequest.cs
- TablePatternIdentifiers.cs
- ThemeDirectoryCompiler.cs
- RuleSettings.cs
- HwndHostAutomationPeer.cs
- PointCollectionConverter.cs
- PermissionRequestEvidence.cs
- _SslStream.cs
- altserialization.cs
- XmlSchemaComplexContentRestriction.cs
- WindowsListViewGroupHelper.cs
- StylusCollection.cs
- WebException.cs
- XmlMapping.cs
- WebHttpSecurityElement.cs
- TreeNode.cs
- ContextStack.cs
- CanExecuteRoutedEventArgs.cs