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
- SystemParameters.cs
- CompilerParameters.cs
- Binding.cs
- SubMenuStyleCollection.cs
- LongTypeConverter.cs
- InheritanceContextHelper.cs
- Interlocked.cs
- Matrix3DValueSerializer.cs
- BookmarkWorkItem.cs
- GuidConverter.cs
- ListBoxItemAutomationPeer.cs
- EntityDataSourceColumn.cs
- XPathChildIterator.cs
- ArgumentNullException.cs
- HttpHandlerActionCollection.cs
- GradientSpreadMethodValidation.cs
- Certificate.cs
- AsyncDataRequest.cs
- ActivityBindForm.cs
- Compensate.cs
- UpdateTracker.cs
- RouteParametersHelper.cs
- GC.cs
- TextCollapsingProperties.cs
- ObjectMemberMapping.cs
- DrawingCollection.cs
- Item.cs
- SizeChangedEventArgs.cs
- MsmqOutputChannel.cs
- _AutoWebProxyScriptWrapper.cs
- XmlElementAttribute.cs
- FormatterConverter.cs
- XmlArrayItemAttribute.cs
- TranslateTransform3D.cs
- WmlPageAdapter.cs
- Inline.cs
- CAGDesigner.cs
- _NegotiateClient.cs
- SecurityIdentifierElementCollection.cs
- MatchingStyle.cs
- RequestCacheManager.cs
- UserPersonalizationStateInfo.cs
- TextEditorTables.cs
- HiddenFieldPageStatePersister.cs
- NavigationProperty.cs
- SecurityContextKeyIdentifierClause.cs
- SerializationSectionGroup.cs
- CommandField.cs
- MissingSatelliteAssemblyException.cs
- SecurityElement.cs
- NavigationPropertyAccessor.cs
- Control.cs
- RealizationDrawingContextWalker.cs
- SamlSubjectStatement.cs
- AppDomainFactory.cs
- ShaderEffect.cs
- Positioning.cs
- Icon.cs
- DirectionalLight.cs
- SmtpDateTime.cs
- SafeFileMappingHandle.cs
- IssuedTokenServiceElement.cs
- ElementProxy.cs
- HostProtectionException.cs
- TextWriter.cs
- Axis.cs
- ColorConvertedBitmap.cs
- OperandQuery.cs
- ApplicationBuildProvider.cs
- TextServicesCompartmentContext.cs
- CodeTypeMember.cs
- FrugalList.cs
- Int64AnimationUsingKeyFrames.cs
- ImageConverter.cs
- SchemaImporterExtension.cs
- WindowsListViewSubItem.cs
- SessionPageStateSection.cs
- SkinIDTypeConverter.cs
- DbReferenceCollection.cs
- TcpClientSocketManager.cs
- FigureParagraph.cs
- UpdateEventArgs.cs
- SimpleWorkerRequest.cs
- DetailsViewUpdatedEventArgs.cs
- UmAlQuraCalendar.cs
- SettingsPropertyWrongTypeException.cs
- PriorityRange.cs
- WebBrowser.cs
- TextPointer.cs
- WindowsTreeView.cs
- QueryRelOp.cs
- TransformerConfigurationWizardBase.cs
- DesignSurfaceManager.cs
- mongolianshape.cs
- XmlReflectionMember.cs
- PropertyChangedEventArgs.cs
- SafeReversePInvokeHandle.cs
- DataProtection.cs
- HtmlElementCollection.cs
- BulletedListDesigner.cs