Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / clr / src / BCL / System / MissingMemberException.cs / 1 / MissingMemberException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: MissingMemberException ** ** ** Purpose: The exception class for versioning problems with DLLS. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Remoting; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Globalization; using System.Security.Permissions; [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class MissingMemberException : MemberAccessException, ISerializable { public MissingMemberException() : base(Environment.GetResourceString("Arg_MissingMemberException")) { SetErrorCode(__HResults.COR_E_MISSINGMEMBER); } public MissingMemberException(String message) : base(message) { SetErrorCode(__HResults.COR_E_MISSINGMEMBER); } public MissingMemberException(String message, Exception inner) : base(message, inner) { SetErrorCode(__HResults.COR_E_MISSINGMEMBER); } protected MissingMemberException(SerializationInfo info, StreamingContext context) : base (info, context) { ClassName = (String)info.GetString("MMClassName"); MemberName = (String)info.GetString("MMMemberName"); Signature = (byte[])info.GetValue("MMSignature", typeof(byte[])); } public override String Message { get { if (ClassName == null) { return base.Message; } else { // do any desired fixups to classname here. return String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("MissingMember_Name", ClassName + "." + MemberName + (Signature != null ? " " + FormatSignature(Signature) : ""))); } } } // Called to format signature [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern String FormatSignature(byte [] signature); // Potentially called from the EE private MissingMemberException(String className, String memberName, byte[] signature) { ClassName = className; MemberName = memberName; Signature = signature; } public MissingMemberException(String className, String memberName) { ClassName = className; MemberName = memberName; } [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } base.GetObjectData(info, context); info.AddValue("MMClassName", ClassName, typeof(String)); info.AddValue("MMMemberName", MemberName, typeof(String)); info.AddValue("MMSignature", Signature, typeof(byte[])); } // If ClassName != null, GetMessage will construct on the fly using it // and the other variables. This allows customization of the // format depending on the language environment. protected String ClassName; protected String MemberName; protected byte[] Signature; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: MissingMemberException ** ** ** Purpose: The exception class for versioning problems with DLLS. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Remoting; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Globalization; using System.Security.Permissions; [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class MissingMemberException : MemberAccessException, ISerializable { public MissingMemberException() : base(Environment.GetResourceString("Arg_MissingMemberException")) { SetErrorCode(__HResults.COR_E_MISSINGMEMBER); } public MissingMemberException(String message) : base(message) { SetErrorCode(__HResults.COR_E_MISSINGMEMBER); } public MissingMemberException(String message, Exception inner) : base(message, inner) { SetErrorCode(__HResults.COR_E_MISSINGMEMBER); } protected MissingMemberException(SerializationInfo info, StreamingContext context) : base (info, context) { ClassName = (String)info.GetString("MMClassName"); MemberName = (String)info.GetString("MMMemberName"); Signature = (byte[])info.GetValue("MMSignature", typeof(byte[])); } public override String Message { get { if (ClassName == null) { return base.Message; } else { // do any desired fixups to classname here. return String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("MissingMember_Name", ClassName + "." + MemberName + (Signature != null ? " " + FormatSignature(Signature) : ""))); } } } // Called to format signature [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern String FormatSignature(byte [] signature); // Potentially called from the EE private MissingMemberException(String className, String memberName, byte[] signature) { ClassName = className; MemberName = memberName; Signature = signature; } public MissingMemberException(String className, String memberName) { ClassName = className; MemberName = memberName; } [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } base.GetObjectData(info, context); info.AddValue("MMClassName", ClassName, typeof(String)); info.AddValue("MMMemberName", MemberName, typeof(String)); info.AddValue("MMSignature", Signature, typeof(byte[])); } // If ClassName != null, GetMessage will construct on the fly using it // and the other variables. This allows customization of the // format depending on the language environment. protected String ClassName; protected String MemberName; protected byte[] Signature; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FontStretch.cs
- InfoCardArgumentException.cs
- XmlSchemaCollection.cs
- EncoderParameters.cs
- WebPartConnectionsConfigureVerb.cs
- BatchParser.cs
- SqlFunctions.cs
- Int64AnimationUsingKeyFrames.cs
- XXXInfos.cs
- XmlWriterSettings.cs
- HtmlShimManager.cs
- VectorValueSerializer.cs
- BroadcastEventHelper.cs
- CheckBoxBaseAdapter.cs
- WaveHeader.cs
- shaperfactory.cs
- XmlAttributeOverrides.cs
- Validator.cs
- XamlStream.cs
- CheckedListBox.cs
- Baml2006Reader.cs
- ServiceModelDictionary.cs
- SharedStatics.cs
- SqlStatistics.cs
- IntPtr.cs
- TagPrefixCollection.cs
- DbConnectionInternal.cs
- QuaternionIndependentAnimationStorage.cs
- RankException.cs
- FormCollection.cs
- WebProxyScriptElement.cs
- RemotingServices.cs
- XmlAttributes.cs
- AbstractDataSvcMapFileLoader.cs
- TableRowCollection.cs
- VScrollProperties.cs
- PropertyItem.cs
- BamlStream.cs
- ZipIOCentralDirectoryFileHeader.cs
- DataList.cs
- WebConfigurationHostFileChange.cs
- TraceContext.cs
- HashHelpers.cs
- Char.cs
- FragmentQuery.cs
- WsdlInspector.cs
- BasicHttpBindingElement.cs
- Converter.cs
- ToolbarAUtomationPeer.cs
- EmptyWorkItem.cs
- UpnEndpointIdentityExtension.cs
- Helpers.cs
- VBIdentifierNameEditor.cs
- CompoundFileReference.cs
- CallSiteOps.cs
- XpsDocumentEvent.cs
- MD5CryptoServiceProvider.cs
- BulletChrome.cs
- HMACSHA512.cs
- HyperLink.cs
- PluralizationService.cs
- TextEditorMouse.cs
- ClientCultureInfo.cs
- ReferentialConstraint.cs
- HelpInfo.cs
- BitmapEffectState.cs
- WSSecurityTokenSerializer.cs
- DataGridViewColumnCollection.cs
- Ops.cs
- SourceElementsCollection.cs
- DomNameTable.cs
- BaseParser.cs
- SrgsElement.cs
- ChildChangedEventArgs.cs
- PowerEase.cs
- PageHandlerFactory.cs
- PasswordPropertyTextAttribute.cs
- PeerName.cs
- UIElement.cs
- DecoratedNameAttribute.cs
- DataGridViewRowsAddedEventArgs.cs
- RtfControlWordInfo.cs
- NetworkStream.cs
- InkCanvasFeedbackAdorner.cs
- InstanceView.cs
- SessionStateContainer.cs
- StylusPointDescription.cs
- CounterCreationData.cs
- CodeExporter.cs
- WebPartZoneCollection.cs
- TextAnchor.cs
- CommandLibraryHelper.cs
- DNS.cs
- WebPartMenuStyle.cs
- WinInetCache.cs
- MethodBuilder.cs
- XmlSchemaIdentityConstraint.cs
- CodeDirectiveCollection.cs
- GridViewCommandEventArgs.cs
- OrderedDictionary.cs