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
- DiscoveryDocumentSearchPattern.cs
- FileAuthorizationModule.cs
- LineServicesCallbacks.cs
- ControlPropertyNameConverter.cs
- OwnerDrawPropertyBag.cs
- DataSvcMapFileSerializer.cs
- Crc32.cs
- HorizontalAlignConverter.cs
- CacheChildrenQuery.cs
- DependencyPropertyValueSerializer.cs
- CodeDirectionExpression.cs
- RepeaterCommandEventArgs.cs
- OdbcFactory.cs
- ConvertersCollection.cs
- ConsumerConnectionPoint.cs
- SqlInternalConnection.cs
- PenThreadPool.cs
- CallTemplateAction.cs
- PropertyPath.cs
- SegmentInfo.cs
- PropertyCollection.cs
- TextServicesProperty.cs
- DataChangedEventManager.cs
- AssemblyAttributesGoHere.cs
- ColumnTypeConverter.cs
- ListenDesigner.cs
- DataFormats.cs
- SkewTransform.cs
- Types.cs
- ListChangedEventArgs.cs
- ParenthesizePropertyNameAttribute.cs
- SmiConnection.cs
- AnimationStorage.cs
- Icon.cs
- XhtmlConformanceSection.cs
- TimerElapsedEvenArgs.cs
- GC.cs
- ValidationErrorEventArgs.cs
- InvalidDataException.cs
- PasswordDeriveBytes.cs
- GreenMethods.cs
- OdbcConnectionOpen.cs
- GlyphRunDrawing.cs
- ResourcePermissionBaseEntry.cs
- oledbmetadatacolumnnames.cs
- PasswordRecovery.cs
- _NativeSSPI.cs
- RC2.cs
- WebFormsRootDesigner.cs
- SharedPerformanceCounter.cs
- X509PeerCertificateAuthentication.cs
- ResolveNextArgumentWorkItem.cs
- AppSecurityManager.cs
- WhitespaceRuleReader.cs
- Attachment.cs
- TextEditorMouse.cs
- RIPEMD160.cs
- ImplicitInputBrush.cs
- RelationshipEndCollection.cs
- DictionaryEntry.cs
- StringSource.cs
- TableLayout.cs
- ListView.cs
- GenerateTemporaryAssemblyTask.cs
- XhtmlTextWriter.cs
- MenuAutomationPeer.cs
- WebPartVerbsEventArgs.cs
- QueryOptionExpression.cs
- CodeCommentStatementCollection.cs
- Timer.cs
- _LazyAsyncResult.cs
- SplitterPanel.cs
- ArrayElementGridEntry.cs
- ApplicationInterop.cs
- EntitySqlQueryBuilder.cs
- DateTimeParse.cs
- DropShadowEffect.cs
- CounterSampleCalculator.cs
- FormsAuthentication.cs
- SqlClientWrapperSmiStream.cs
- WebZone.cs
- RawStylusSystemGestureInputReport.cs
- HashAlgorithm.cs
- RequiredAttributeAttribute.cs
- PassportAuthenticationModule.cs
- NotImplementedException.cs
- ValueHandle.cs
- UpDownBase.cs
- GuidelineSet.cs
- BoundPropertyEntry.cs
- WebPartConnectionsConfigureVerb.cs
- DtrList.cs
- WebPartDisplayModeCancelEventArgs.cs
- TabItemWrapperAutomationPeer.cs
- ReadOnlyNameValueCollection.cs
- DocComment.cs
- FontWeightConverter.cs
- ReachBasicContext.cs
- Function.cs
- HttpApplicationFactory.cs