Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / ResourceReferenceKeyNotFoundException.cs / 1305600 / 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
- ClientSettings.cs
- Animatable.cs
- WebHeaderCollection.cs
- PeekCompletedEventArgs.cs
- ExpressionSelection.cs
- FlowDocumentPaginator.cs
- RC2.cs
- XmlSchemaIdentityConstraint.cs
- ColorAnimationBase.cs
- PrivilegedConfigurationManager.cs
- MILUtilities.cs
- BufferedGraphicsContext.cs
- AlignmentXValidation.cs
- ResourceContainer.cs
- UnsafeNativeMethods.cs
- SafeRegistryKey.cs
- RegexReplacement.cs
- Debug.cs
- UpdatableGenericsFeature.cs
- DataGridViewCellCollection.cs
- SoapExtensionTypeElementCollection.cs
- BitmapFrame.cs
- SapiInterop.cs
- DictionaryEntry.cs
- StoreItemCollection.cs
- HyperLinkField.cs
- ObjectStateEntry.cs
- UriTemplateCompoundPathSegment.cs
- CallContext.cs
- WebBrowserBase.cs
- XmlBinaryWriter.cs
- PackageRelationship.cs
- ObjectNavigationPropertyMapping.cs
- webclient.cs
- XmlSchemaSequence.cs
- PathFigureCollection.cs
- WebBrowserSiteBase.cs
- DataGridViewLinkColumn.cs
- SAPIEngineTypes.cs
- GridViewUpdateEventArgs.cs
- Encoder.cs
- CodeAccessPermission.cs
- documentsequencetextpointer.cs
- ContainsRowNumberChecker.cs
- EventWaitHandle.cs
- InstalledVoice.cs
- _TimerThread.cs
- ArrayList.cs
- EventWaitHandle.cs
- PairComparer.cs
- StringArrayConverter.cs
- NCryptNative.cs
- diagnosticsswitches.cs
- WindowsPrincipal.cs
- LocatorGroup.cs
- Brush.cs
- RelationshipSet.cs
- X509CertificateEndpointIdentity.cs
- UnrecognizedPolicyAssertionElement.cs
- DataGridViewButtonCell.cs
- PopupEventArgs.cs
- EnterpriseServicesHelper.cs
- WrapPanel.cs
- CacheMode.cs
- LockedAssemblyCache.cs
- PeerInvitationResponse.cs
- DragStartedEventArgs.cs
- EmptyQuery.cs
- Splitter.cs
- XamlPathDataSerializer.cs
- ComNativeDescriptor.cs
- TraceXPathNavigator.cs
- CompilerWrapper.cs
- CodeArrayCreateExpression.cs
- VectorAnimationUsingKeyFrames.cs
- DataGridViewSelectedCellCollection.cs
- ButtonField.cs
- HybridWebProxyFinder.cs
- DataSourceProvider.cs
- RequestValidator.cs
- ConnectionStringsExpressionBuilder.cs
- PromptBuilder.cs
- DrawListViewItemEventArgs.cs
- ReachDocumentPageSerializer.cs
- SoapIncludeAttribute.cs
- CreateUserWizardStep.cs
- ValueProviderWrapper.cs
- BamlTreeMap.cs
- MenuStrip.cs
- ConfigurationLoader.cs
- OverrideMode.cs
- GPPOINT.cs
- DataServices.cs
- WebPartDeleteVerb.cs
- AccessorTable.cs
- DataGridColumnHeader.cs
- ServiceSecurityAuditBehavior.cs
- XmlArrayItemAttribute.cs
- FormatStringEditor.cs
- AppDomainUnloadedException.cs