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
- TextUtf8RawTextWriter.cs
- SqlPersonalizationProvider.cs
- DataGridViewTextBoxEditingControl.cs
- ItemCollectionEditor.cs
- ProxyManager.cs
- ConsoleTraceListener.cs
- GetPageNumberCompletedEventArgs.cs
- CursorConverter.cs
- ServiceMetadataContractBehavior.cs
- ConstructorArgumentAttribute.cs
- XamlFigureLengthSerializer.cs
- CodeDomSerializerBase.cs
- TextDecoration.cs
- basevalidator.cs
- ComponentSerializationService.cs
- SemaphoreFullException.cs
- HostProtectionPermission.cs
- Site.cs
- LinqDataView.cs
- FixedSOMLineCollection.cs
- ArglessEventHandlerProxy.cs
- XmlSerializationGeneratedCode.cs
- SurrogateSelector.cs
- ProviderMetadataCachedInformation.cs
- StsCommunicationException.cs
- UseManagedPresentationBindingElementImporter.cs
- SiblingIterators.cs
- TimeSpanMinutesConverter.cs
- Configuration.cs
- ResourceCategoryAttribute.cs
- PriorityBinding.cs
- CommandField.cs
- SessionState.cs
- AtomicFile.cs
- XPathScanner.cs
- Model3D.cs
- SerializationFieldInfo.cs
- DataGridViewImageColumn.cs
- RadioButtonBaseAdapter.cs
- StringFunctions.cs
- SafeSecurityHandles.cs
- NonVisualControlAttribute.cs
- Operator.cs
- Point.cs
- PowerStatus.cs
- CodeTypeReferenceExpression.cs
- RelatedCurrencyManager.cs
- BrushValueSerializer.cs
- UpdatePanelTrigger.cs
- ItemChangedEventArgs.cs
- ModifiableIteratorCollection.cs
- FtpCachePolicyElement.cs
- UnionExpr.cs
- HTTPNotFoundHandler.cs
- ProviderUtil.cs
- StringArrayConverter.cs
- HostProtectionException.cs
- StylusPointPropertyUnit.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- XamlFilter.cs
- FormatException.cs
- SqlDuplicator.cs
- oledbconnectionstring.cs
- TypeInfo.cs
- SourceElementsCollection.cs
- FieldAccessException.cs
- NamespaceExpr.cs
- ColumnResult.cs
- ListBoxItem.cs
- TextEditorCopyPaste.cs
- Geometry.cs
- StrokeFIndices.cs
- EdmItemCollection.cs
- FrameworkElementFactoryMarkupObject.cs
- BlobPersonalizationState.cs
- XmlSchemaGroup.cs
- WebPartZoneCollection.cs
- SqlProviderServices.cs
- CompressStream.cs
- TextReader.cs
- RowUpdatedEventArgs.cs
- CompilationLock.cs
- XhtmlConformanceSection.cs
- TabControlDesigner.cs
- TransportContext.cs
- EventHandlersStore.cs
- MsmqTransportSecurity.cs
- InplaceBitmapMetadataWriter.cs
- Utils.cs
- BuildDependencySet.cs
- SiteMapDesignerDataSourceView.cs
- OdbcConnectionHandle.cs
- BinHexEncoder.cs
- WindowsPrincipal.cs
- ApplicationInterop.cs
- TriggerBase.cs
- compensatingcollection.cs
- ResourceReferenceExpression.cs
- GroupItem.cs
- SystemNetworkInterface.cs