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
- EnumerableRowCollection.cs
- ObjectManager.cs
- SplitterEvent.cs
- ByteRangeDownloader.cs
- XmlEncApr2001.cs
- KeyGesture.cs
- AssemblyBuilder.cs
- ReverseInheritProperty.cs
- ProcessHostMapPath.cs
- ForwardPositionQuery.cs
- ColorContextHelper.cs
- ProfileManager.cs
- XmlNotation.cs
- ClientSideQueueItem.cs
- LiteralDesigner.cs
- SchemaNamespaceManager.cs
- StringExpressionSet.cs
- LinqTreeNodeEvaluator.cs
- ContractMethodParameterInfo.cs
- PipeStream.cs
- LambdaExpression.cs
- RepeaterDesigner.cs
- RequestQueryProcessor.cs
- MatrixAnimationUsingKeyFrames.cs
- ConcurrentQueue.cs
- TableDetailsRow.cs
- IndentedWriter.cs
- FactoryGenerator.cs
- CqlWriter.cs
- DataSourceSelectArguments.cs
- Menu.cs
- Vars.cs
- BinaryConverter.cs
- DataExpression.cs
- TableItemProviderWrapper.cs
- SecUtil.cs
- PtsHelper.cs
- CompositeControl.cs
- filewebresponse.cs
- TraceSection.cs
- EntityContainerEmitter.cs
- RemotingSurrogateSelector.cs
- BinHexDecoder.cs
- TCPListener.cs
- HttpModuleActionCollection.cs
- ColumnMapCopier.cs
- ColumnTypeConverter.cs
- ReliableChannelListener.cs
- NumericUpDownAcceleration.cs
- OverrideMode.cs
- GenericsInstances.cs
- StickyNote.cs
- DbProviderSpecificTypePropertyAttribute.cs
- embossbitmapeffect.cs
- MarshalByValueComponent.cs
- EventListener.cs
- XmlTextEncoder.cs
- SQLDateTimeStorage.cs
- WindowPatternIdentifiers.cs
- WebServiceClientProxyGenerator.cs
- XmlCharCheckingWriter.cs
- DefaultPrintController.cs
- XmlSchemaChoice.cs
- InvalidAsynchronousStateException.cs
- IItemProperties.cs
- SmtpLoginAuthenticationModule.cs
- WebRequestModuleElement.cs
- SafeRightsManagementPubHandle.cs
- QuotedStringFormatReader.cs
- SourceFileBuildProvider.cs
- MergePropertyDescriptor.cs
- ByteConverter.cs
- UdpMessageProperty.cs
- DataObject.cs
- ValueTable.cs
- FilterFactory.cs
- XmlCharType.cs
- Inline.cs
- UnmanagedHandle.cs
- Int64Animation.cs
- UInt32.cs
- _emptywebproxy.cs
- COMException.cs
- ReaderContextStackData.cs
- LogReserveAndAppendState.cs
- DataBindingCollectionConverter.cs
- FrugalList.cs
- GridSplitter.cs
- HttpProxyTransportBindingElement.cs
- SortFieldComparer.cs
- HttpConfigurationContext.cs
- CodeStatement.cs
- FileDialogPermission.cs
- CharacterMetrics.cs
- ListItemCollection.cs
- EventLogTraceListener.cs
- CompensationTokenData.cs
- Graphics.cs
- ListManagerBindingsCollection.cs
- QueryTreeBuilder.cs