Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / MissingMemberException.cs / 1305376 / 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; using System.Runtime.Versioning; using System.Diagnostics.Contracts; [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); } [System.Security.SecuritySafeCritical] // auto-generated 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 { [System.Security.SecuritySafeCritical] // auto-generated get { if (ClassName == null) { return base.Message; } else { // do any desired fixups to classname here. return Environment.GetResourceString("MissingMember_Name", ClassName + "." + MemberName + (Signature != null ? " " + FormatSignature(Signature) : "")); } } } // Called to format signature [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [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; } [System.Security.SecurityCritical] // auto-generated_required public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } Contract.EndContractBlock(); 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; using System.Runtime.Versioning; using System.Diagnostics.Contracts; [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); } [System.Security.SecuritySafeCritical] // auto-generated 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 { [System.Security.SecuritySafeCritical] // auto-generated get { if (ClassName == null) { return base.Message; } else { // do any desired fixups to classname here. return Environment.GetResourceString("MissingMember_Name", ClassName + "." + MemberName + (Signature != null ? " " + FormatSignature(Signature) : "")); } } } // Called to format signature [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [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; } [System.Security.SecurityCritical] // auto-generated_required public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } Contract.EndContractBlock(); 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
- HtmlElementErrorEventArgs.cs
- TagMapCollection.cs
- StructuralCache.cs
- RevocationPoint.cs
- BulletedListEventArgs.cs
- SapiGrammar.cs
- FormsAuthenticationEventArgs.cs
- StylusOverProperty.cs
- UrlPropertyAttribute.cs
- TdsParserStaticMethods.cs
- Win32.cs
- XmlUrlResolver.cs
- Base64Encoder.cs
- HttpApplication.cs
- EnvironmentPermission.cs
- DataGridItemEventArgs.cs
- XMLSyntaxException.cs
- DeliveryRequirementsAttribute.cs
- LineBreakRecord.cs
- ToolStripItemCollection.cs
- TableLayoutStyle.cs
- DragStartedEventArgs.cs
- ShaderEffect.cs
- FontClient.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- LinkedResource.cs
- Zone.cs
- TripleDES.cs
- EntitySqlQueryCacheEntry.cs
- CounterSetInstanceCounterDataSet.cs
- FactoryRecord.cs
- BamlVersionHeader.cs
- XmlFormatExtensionAttribute.cs
- PanelStyle.cs
- Brush.cs
- SystemResourceHost.cs
- PolicyStatement.cs
- SoapSchemaMember.cs
- XPathNodeIterator.cs
- AssemblyAttributes.cs
- OdbcErrorCollection.cs
- AssemblyHash.cs
- _SSPISessionCache.cs
- DBPropSet.cs
- Animatable.cs
- WebPartTracker.cs
- MenuItem.cs
- Stopwatch.cs
- UserNameSecurityTokenParameters.cs
- TextTreeTextNode.cs
- ProgressBarHighlightConverter.cs
- nulltextnavigator.cs
- Size3DValueSerializer.cs
- Calendar.cs
- MenuItem.cs
- FontSizeConverter.cs
- DetailsViewDeleteEventArgs.cs
- BlurEffect.cs
- LocalizableAttribute.cs
- ContentValidator.cs
- CompilerTypeWithParams.cs
- OrderedEnumerableRowCollection.cs
- VBIdentifierDesigner.xaml.cs
- ElementNotAvailableException.cs
- SqlDataSourceStatusEventArgs.cs
- XmlLanguageConverter.cs
- CookielessHelper.cs
- PathGradientBrush.cs
- MaskedTextBoxTextEditor.cs
- InkCanvas.cs
- GlobalizationAssembly.cs
- TrustManagerPromptUI.cs
- ChtmlCalendarAdapter.cs
- Axis.cs
- WebAdminConfigurationHelper.cs
- DynamicResourceExtension.cs
- DocumentXmlWriter.cs
- ParenthesizePropertyNameAttribute.cs
- ColorConverter.cs
- CharAnimationBase.cs
- Stopwatch.cs
- EntityDataSourceChangingEventArgs.cs
- PerspectiveCamera.cs
- WindowsToolbarAsMenu.cs
- ConfigurationManagerHelperFactory.cs
- HatchBrush.cs
- GeneratedContractType.cs
- CLRBindingWorker.cs
- PenCursorManager.cs
- BooleanFunctions.cs
- JsonReaderDelegator.cs
- WarningException.cs
- ExpressionTextBoxAutomationPeer.cs
- _SSPISessionCache.cs
- RewritingSimplifier.cs
- PointConverter.cs
- InteropAutomationProvider.cs
- hwndwrapper.cs
- RightsManagementProvider.cs
- JsonXmlDataContract.cs