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
- AuthenticationConfig.cs
- WindowsSpinner.cs
- PanelStyle.cs
- SimpleFieldTemplateUserControl.cs
- TabItemWrapperAutomationPeer.cs
- XmlMemberMapping.cs
- RowParagraph.cs
- EntitySetBase.cs
- TextSelection.cs
- InstancePersistenceCommandException.cs
- EngineSiteSapi.cs
- Sql8ExpressionRewriter.cs
- TextBoxView.cs
- TrackingMemoryStreamFactory.cs
- OleAutBinder.cs
- EntityDataSourceView.cs
- DecoratedNameAttribute.cs
- ColumnHeader.cs
- HtmlTextArea.cs
- XslNumber.cs
- Renderer.cs
- WorkflowQueuingService.cs
- ITextView.cs
- MessageHeaderDescription.cs
- MultipleViewProviderWrapper.cs
- RelationshipConverter.cs
- ContentValidator.cs
- GuidelineSet.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- SponsorHelper.cs
- DocumentPage.cs
- FunctionQuery.cs
- Keywords.cs
- BuildProvider.cs
- Facet.cs
- ColorKeyFrameCollection.cs
- DetailsViewModeEventArgs.cs
- KeyedCollection.cs
- UidManager.cs
- ObjectContextServiceProvider.cs
- ProfileSettingsCollection.cs
- XmlTextReaderImplHelpers.cs
- DataControlField.cs
- DataSet.cs
- TdsParameterSetter.cs
- QilInvokeLateBound.cs
- Rotation3D.cs
- PropertyChange.cs
- OdbcConnectionString.cs
- HtmlTableRow.cs
- Panel.cs
- Vertex.cs
- TreeIterators.cs
- DocumentOrderComparer.cs
- GlyphsSerializer.cs
- FieldToken.cs
- SqlBuffer.cs
- KeysConverter.cs
- MenuRendererClassic.cs
- OracleTransaction.cs
- SchemaElementLookUpTableEnumerator.cs
- BinHexEncoding.cs
- Geometry.cs
- LogRecordSequence.cs
- EmptyCollection.cs
- CodeStatementCollection.cs
- TrustSection.cs
- ValidationSummary.cs
- RegexStringValidatorAttribute.cs
- NeedSkipTokenVisitor.cs
- ContainerUtilities.cs
- RangeBaseAutomationPeer.cs
- Propagator.JoinPropagator.cs
- Types.cs
- MailMessageEventArgs.cs
- ContextStaticAttribute.cs
- ImageListStreamer.cs
- ObjectStorage.cs
- SafeCryptoHandles.cs
- ServiceX509SecurityTokenProvider.cs
- safemediahandle.cs
- Util.cs
- CurrentChangedEventManager.cs
- NamespaceQuery.cs
- UnsafeNativeMethods.cs
- LingerOption.cs
- DataGridViewButtonColumn.cs
- XmlDesigner.cs
- SigningProgress.cs
- VerticalAlignConverter.cs
- SystemColorTracker.cs
- TableColumn.cs
- SequenceDesignerAccessibleObject.cs
- FieldBuilder.cs
- SurrogateChar.cs
- ListBase.cs
- ImageMapEventArgs.cs
- AuthenticationConfig.cs
- HtmlInputSubmit.cs
- MenuBase.cs