Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / Runtime / CompilerServices / MethodImplAttribute.cs / 2 / MethodImplAttribute.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Runtime.CompilerServices { using System; using System.Reflection; // This Enum matchs the miImpl flags defined in corhdr.h. It is used to specify // certain method properties. [Serializable] [Flags] [System.Runtime.InteropServices.ComVisible(true)] public enum MethodImplOptions { Unmanaged = System.Reflection.MethodImplAttributes.Unmanaged, ForwardRef = System.Reflection.MethodImplAttributes.ForwardRef, PreserveSig = System.Reflection.MethodImplAttributes.PreserveSig, InternalCall = System.Reflection.MethodImplAttributes.InternalCall, Synchronized = System.Reflection.MethodImplAttributes.Synchronized, NoInlining = System.Reflection.MethodImplAttributes.NoInlining, NoOptimization = System.Reflection.MethodImplAttributes.NoOptimization, // **** If you add something, update internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)! **** } [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public enum MethodCodeType { IL = System.Reflection.MethodImplAttributes.IL, Native = System.Reflection.MethodImplAttributes.Native, ///OPTIL = System.Reflection.MethodImplAttributes.OPTIL, Runtime = System.Reflection.MethodImplAttributes.Runtime } // Custom attribute to specify additional method properties. [Serializable, AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)] [System.Runtime.InteropServices.ComVisible(true)] sealed public class MethodImplAttribute : Attribute { internal MethodImplOptions _val; public MethodCodeType MethodCodeType; internal MethodImplAttribute(MethodImplAttributes methodImplAttributes) { MethodImplOptions all = MethodImplOptions.Unmanaged | MethodImplOptions.ForwardRef | MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall | MethodImplOptions.Synchronized | MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization; _val = ((MethodImplOptions)methodImplAttributes) & all; } public MethodImplAttribute(MethodImplOptions methodImplOptions) { _val = methodImplOptions; } public MethodImplAttribute(short value) { _val = (MethodImplOptions)value; } public MethodImplAttribute() { } public MethodImplOptions Value { get {return _val;} } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Runtime.CompilerServices { using System; using System.Reflection; // This Enum matchs the miImpl flags defined in corhdr.h. It is used to specify // certain method properties. [Serializable] [Flags] [System.Runtime.InteropServices.ComVisible(true)] public enum MethodImplOptions { Unmanaged = System.Reflection.MethodImplAttributes.Unmanaged, ForwardRef = System.Reflection.MethodImplAttributes.ForwardRef, PreserveSig = System.Reflection.MethodImplAttributes.PreserveSig, InternalCall = System.Reflection.MethodImplAttributes.InternalCall, Synchronized = System.Reflection.MethodImplAttributes.Synchronized, NoInlining = System.Reflection.MethodImplAttributes.NoInlining, NoOptimization = System.Reflection.MethodImplAttributes.NoOptimization, // **** If you add something, update internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)! **** } [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public enum MethodCodeType { IL = System.Reflection.MethodImplAttributes.IL, Native = System.Reflection.MethodImplAttributes.Native, /// OPTIL = System.Reflection.MethodImplAttributes.OPTIL, Runtime = System.Reflection.MethodImplAttributes.Runtime } // Custom attribute to specify additional method properties. [Serializable, AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)] [System.Runtime.InteropServices.ComVisible(true)] sealed public class MethodImplAttribute : Attribute { internal MethodImplOptions _val; public MethodCodeType MethodCodeType; internal MethodImplAttribute(MethodImplAttributes methodImplAttributes) { MethodImplOptions all = MethodImplOptions.Unmanaged | MethodImplOptions.ForwardRef | MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall | MethodImplOptions.Synchronized | MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization; _val = ((MethodImplOptions)methodImplAttributes) & all; } public MethodImplAttribute(MethodImplOptions methodImplOptions) { _val = methodImplOptions; } public MethodImplAttribute(short value) { _val = (MethodImplOptions)value; } public MethodImplAttribute() { } public MethodImplOptions Value { get {return _val;} } } } // 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
- XmlProcessingInstruction.cs
- FrameworkElement.cs
- MasterPageParser.cs
- UniformGrid.cs
- HMACMD5.cs
- XmlSiteMapProvider.cs
- SyntaxCheck.cs
- RtfControlWordInfo.cs
- EventDescriptor.cs
- Tile.cs
- TemplateKeyConverter.cs
- Currency.cs
- ECDsaCng.cs
- TriggerBase.cs
- DropShadowEffect.cs
- MessageContractExporter.cs
- XamlWrappingReader.cs
- Collection.cs
- HtmlInputButton.cs
- recordstatefactory.cs
- ToolTipService.cs
- Input.cs
- Frame.cs
- Graph.cs
- SecurityElement.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ListViewItemEventArgs.cs
- unsafenativemethodsother.cs
- NativeWindow.cs
- EncoderParameter.cs
- FontNameEditor.cs
- ImagingCache.cs
- WebPartChrome.cs
- ImageMap.cs
- GridViewColumnCollectionChangedEventArgs.cs
- AssociationTypeEmitter.cs
- securestring.cs
- CustomAttributeBuilder.cs
- EventLogPermission.cs
- HtmlMobileTextWriter.cs
- DurableInstanceManager.cs
- DeclaredTypeElementCollection.cs
- KeyValueConfigurationCollection.cs
- x509store.cs
- SqlSelectStatement.cs
- AmbientValueAttribute.cs
- EntityDataSourceWrapperCollection.cs
- ConfigViewGenerator.cs
- XmlSchemaAttribute.cs
- ComponentEvent.cs
- DataGridViewLinkColumn.cs
- ObjectSet.cs
- RangeBase.cs
- CryptoKeySecurity.cs
- CrossSiteScriptingValidation.cs
- AstNode.cs
- Vector.cs
- EncryptedType.cs
- XmlSchemaInfo.cs
- SrgsRule.cs
- HtmlToClrEventProxy.cs
- SafeEventLogReadHandle.cs
- DataTemplateKey.cs
- DeleteCardRequest.cs
- TypeUtils.cs
- ConfigXmlAttribute.cs
- DocumentPageTextView.cs
- BaseCodePageEncoding.cs
- StandardToolWindows.cs
- AsnEncodedData.cs
- WebZone.cs
- PropertyFilterAttribute.cs
- ResXResourceSet.cs
- HttpDebugHandler.cs
- QuaternionRotation3D.cs
- CanonicalXml.cs
- Compilation.cs
- WmfPlaceableFileHeader.cs
- FontUnit.cs
- FormViewPagerRow.cs
- MouseDevice.cs
- SqlDuplicator.cs
- TableAutomationPeer.cs
- _Events.cs
- MouseEvent.cs
- TimeBoundedCache.cs
- ScrollChrome.cs
- Missing.cs
- ErrorHandlingAcceptor.cs
- MobileControlsSectionHelper.cs
- HttpFileCollection.cs
- DataGridSortCommandEventArgs.cs
- DesignSurfaceEvent.cs
- _SafeNetHandles.cs
- Operator.cs
- Evaluator.cs
- QilLoop.cs
- CodeTypeConstructor.cs
- VisualTransition.cs
- MailAddress.cs