Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Reflection / Emit / FieldToken.cs / 1 / FieldToken.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: FieldToken ** ** ** Purpose: Represents a Field to the ILGenerator Class ** ** ===========================================================*/ namespace System.Reflection.Emit { using System; using System.Reflection; using System.Security.Permissions; // The FieldToken class is an opaque representation of the Token returned // by the Metadata to represent the field. FieldTokens are generated by // Module.GetFieldToken(). There are no meaningful accessors on this class, // but it can be passed to ILGenerator which understands it's internals. [Serializable()] [System.Runtime.InteropServices.ComVisible(true)] public struct FieldToken { public static readonly FieldToken Empty = new FieldToken(); internal int m_fieldTok; internal Object m_class; // Creates an empty FieldToken. A publicly visible constructor so that // it can be created on the stack. //public FieldToken() { // m_fieldTok=0; // m_attributes=0; // m_class=null; //} // The actual constructor. Sets the field, attributes and class // variables internal FieldToken (int field, Type fieldClass) { m_fieldTok=field; m_class = fieldClass; } public int Token { get { return m_fieldTok; } } // Generates the hash code for this field. public override int GetHashCode() { return (m_fieldTok); } // Returns true if obj is an instance of FieldToken and is // equal to this instance. public override bool Equals(Object obj) { if (obj is FieldToken) return Equals((FieldToken)obj); else return false; } public bool Equals(FieldToken obj) { return obj.m_fieldTok == m_fieldTok && obj.m_class == m_class; } public static bool operator ==(FieldToken a, FieldToken b) { return a.Equals(b); } public static bool operator !=(FieldToken a, FieldToken b) { return !(a == b); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ErrorStyle.cs
- XmlSchemaSimpleType.cs
- Matrix.cs
- PolicyManager.cs
- ContainerParagraph.cs
- Binding.cs
- SqlResolver.cs
- DecoderFallbackWithFailureFlag.cs
- SyndicationFeed.cs
- AuthenticationSchemesHelper.cs
- ECDsaCng.cs
- ExpressionParser.cs
- FrameSecurityDescriptor.cs
- RawMouseInputReport.cs
- DropSource.cs
- DoubleCollectionValueSerializer.cs
- PagerStyle.cs
- PrimitiveXmlSerializers.cs
- TranslateTransform3D.cs
- WebConvert.cs
- RawUIStateInputReport.cs
- TextElementEnumerator.cs
- DefaultPrintController.cs
- MetadataAssemblyHelper.cs
- iisPickupDirectory.cs
- SchemaHelper.cs
- StateMachineDesignerPaint.cs
- IdentityManager.cs
- FileInfo.cs
- TextTreePropertyUndoUnit.cs
- GlobalProxySelection.cs
- TripleDES.cs
- LayoutInformation.cs
- SiteOfOriginContainer.cs
- DataContractSerializer.cs
- EndpointAddress10.cs
- ElementMarkupObject.cs
- MatrixCamera.cs
- MsmqReceiveHelper.cs
- RegisteredDisposeScript.cs
- _SafeNetHandles.cs
- UInt64Storage.cs
- SqlConnectionHelper.cs
- DefaultEventAttribute.cs
- SecuritySessionClientSettings.cs
- RadioButton.cs
- GenericWebPart.cs
- ContextMarshalException.cs
- InnerItemCollectionView.cs
- BooleanFunctions.cs
- SqlCacheDependency.cs
- SchemaReference.cs
- ParenthesizePropertyNameAttribute.cs
- StateDesigner.CommentLayoutGlyph.cs
- TransformerConfigurationWizardBase.cs
- Stackframe.cs
- DbParameterCollection.cs
- TaskScheduler.cs
- HttpCacheVary.cs
- GeneralTransformGroup.cs
- _DomainName.cs
- Validator.cs
- UrlPropertyAttribute.cs
- EdmScalarPropertyAttribute.cs
- XNameTypeConverter.cs
- FontUnitConverter.cs
- ShowExpandedMultiValueConverter.cs
- ScriptManager.cs
- DocComment.cs
- DataServiceContext.cs
- SchemaNamespaceManager.cs
- MenuItemCollection.cs
- ArraySortHelper.cs
- ValidatorCompatibilityHelper.cs
- PlatformNotSupportedException.cs
- ThreadStartException.cs
- XpsS0ValidatingLoader.cs
- XPathPatternBuilder.cs
- AdjustableArrowCap.cs
- VariantWrapper.cs
- SponsorHelper.cs
- BuildProviderAppliesToAttribute.cs
- MultipleViewProviderWrapper.cs
- XamlTypeMapper.cs
- DragSelectionMessageFilter.cs
- Thumb.cs
- SchemaMerger.cs
- RuleSettings.cs
- FileSystemEventArgs.cs
- DeviceOverridableAttribute.cs
- TraceContextRecord.cs
- DocumentCollection.cs
- Int64KeyFrameCollection.cs
- StringKeyFrameCollection.cs
- ColorConvertedBitmap.cs
- WindowProviderWrapper.cs
- RelationshipEndCollection.cs
- SelectionGlyph.cs
- WsatStrings.cs
- WebPartChrome.cs