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
- WeakRefEnumerator.cs
- TableColumn.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- ShapingEngine.cs
- FunctionGenerator.cs
- odbcmetadatafactory.cs
- WebPartDisplayMode.cs
- COAUTHINFO.cs
- XmlElementCollection.cs
- TrackingRecordPreFilter.cs
- DelegatingTypeDescriptionProvider.cs
- DbConnectionStringCommon.cs
- EntitySqlQueryCacheKey.cs
- HtmlTable.cs
- TemplateField.cs
- XamlInt32CollectionSerializer.cs
- NodeInfo.cs
- HashMembershipCondition.cs
- ParseHttpDate.cs
- __ConsoleStream.cs
- Transform3D.cs
- BooleanProjectedSlot.cs
- WaitHandleCannotBeOpenedException.cs
- ObjectListItemCollection.cs
- DoubleConverter.cs
- Privilege.cs
- ImageDrawing.cs
- SQLBinary.cs
- RelOps.cs
- AsyncPostBackErrorEventArgs.cs
- RequestReplyCorrelator.cs
- DataGridViewHitTestInfo.cs
- ReverseComparer.cs
- SelectionRange.cs
- LoaderAllocator.cs
- mil_commands.cs
- httpapplicationstate.cs
- SettingsPropertyValueCollection.cs
- PathData.cs
- serverconfig.cs
- GetPageNumberCompletedEventArgs.cs
- Condition.cs
- SecureUICommand.cs
- ControlOperationInvoker.cs
- CodeCompiler.cs
- UndoEngine.cs
- RoutedEvent.cs
- ReadOnlyDictionary.cs
- XmlSchemaProviderAttribute.cs
- ProfileSettingsCollection.cs
- DocumentViewerBase.cs
- Object.cs
- StackBuilderSink.cs
- DataPointer.cs
- ProcessModuleCollection.cs
- XmlNodeComparer.cs
- ValidationErrorEventArgs.cs
- PrefixQName.cs
- TypeContext.cs
- SQLMoney.cs
- SafeNativeMethods.cs
- MediaSystem.cs
- DataServiceException.cs
- VisualTreeHelper.cs
- EventTrigger.cs
- Rotation3DKeyFrameCollection.cs
- __TransparentProxy.cs
- Rules.cs
- ParseElementCollection.cs
- MessageBox.cs
- XmlAttributeProperties.cs
- WeakEventTable.cs
- SpeechEvent.cs
- ApplicationContext.cs
- SimpleType.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- BitSet.cs
- XmlTypeAttribute.cs
- RightsManagementPermission.cs
- NavigationHelper.cs
- PublishLicense.cs
- EntityClassGenerator.cs
- SmiEventSink.cs
- UidPropertyAttribute.cs
- NotSupportedException.cs
- MouseButtonEventArgs.cs
- CalendarAutoFormat.cs
- CheckBoxStandardAdapter.cs
- EntitySqlQueryState.cs
- FrameDimension.cs
- RoutedEvent.cs
- CompilerScope.cs
- UncommonField.cs
- Int32CollectionValueSerializer.cs
- AssemblyNameProxy.cs
- HostingEnvironmentSection.cs
- DecimalStorage.cs
- ClientScriptManager.cs
- ComPlusTypeLoader.cs
- UnmanagedMemoryStreamWrapper.cs