Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Reflection / Emit / PropertyToken.cs / 1305376 / PropertyToken.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: PropertyToken ** **[....] ** ** ** Propertybuilder is for client to define properties for a class ** ** ===========================================================*/ namespace System.Reflection.Emit { using System; using System.Reflection; using System.Security.Permissions; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public struct PropertyToken { public static readonly PropertyToken Empty = new PropertyToken(); internal int m_property; internal PropertyToken(int str) { m_property=str; } public int Token { get { return m_property; } } // Satisfy value class requirements public override int GetHashCode() { return m_property; } // Satisfy value class requirements public override bool Equals(Object obj) { if (obj is PropertyToken) return Equals((PropertyToken)obj); else return false; } public bool Equals(PropertyToken obj) { return obj.m_property == m_property; } public static bool operator ==(PropertyToken a, PropertyToken b) { return a.Equals(b); } public static bool operator !=(PropertyToken a, PropertyToken b) { return !(a == b); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: PropertyToken ** **[....] ** ** ** Propertybuilder is for client to define properties for a class ** ** ===========================================================*/ namespace System.Reflection.Emit { using System; using System.Reflection; using System.Security.Permissions; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public struct PropertyToken { public static readonly PropertyToken Empty = new PropertyToken(); internal int m_property; internal PropertyToken(int str) { m_property=str; } public int Token { get { return m_property; } } // Satisfy value class requirements public override int GetHashCode() { return m_property; } // Satisfy value class requirements public override bool Equals(Object obj) { if (obj is PropertyToken) return Equals((PropertyToken)obj); else return false; } public bool Equals(PropertyToken obj) { return obj.m_property == m_property; } public static bool operator ==(PropertyToken a, PropertyToken b) { return a.Equals(b); } public static bool operator !=(PropertyToken a, PropertyToken b) { return !(a == b); } } } // 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
- EventPropertyMap.cs
- DataFormats.cs
- SecureEnvironment.cs
- COM2ExtendedTypeConverter.cs
- SafeMILHandleMemoryPressure.cs
- _UriTypeConverter.cs
- MemoryMappedViewAccessor.cs
- XmlReader.cs
- Rfc4050KeyFormatter.cs
- FullTextState.cs
- DataObject.cs
- ObjectStateManager.cs
- HtmlControl.cs
- DesignerFrame.cs
- CheckoutException.cs
- ViewCellSlot.cs
- CodeCommentStatementCollection.cs
- IconBitmapDecoder.cs
- StylusButton.cs
- HMACSHA384.cs
- TableStyle.cs
- WindowsAuthenticationEventArgs.cs
- TreeNodeEventArgs.cs
- IconBitmapDecoder.cs
- SchemaObjectWriter.cs
- ComponentCollection.cs
- ClaimTypeRequirement.cs
- CanonicalFontFamilyReference.cs
- StrongNameKeyPair.cs
- ExternalCalls.cs
- HtmlTableRow.cs
- TTSVoice.cs
- Persist.cs
- BinaryMethodMessage.cs
- HtmlElementErrorEventArgs.cs
- ForceCopyBuildProvider.cs
- ConnectorDragDropGlyph.cs
- AssociationSetMetadata.cs
- TimeoutException.cs
- ScrollBarAutomationPeer.cs
- WindowsFormsSynchronizationContext.cs
- PerfService.cs
- TypeConverterValueSerializer.cs
- DoubleAnimationUsingKeyFrames.cs
- DynamicUpdateCommand.cs
- DataGridViewRowConverter.cs
- ListView.cs
- CustomLineCap.cs
- MediaCommands.cs
- DomNameTable.cs
- XmlSubtreeReader.cs
- QilList.cs
- HttpListenerException.cs
- BinaryEditor.cs
- FormsAuthenticationUserCollection.cs
- WebHostedComPlusServiceHost.cs
- AttributeInfo.cs
- MediaSystem.cs
- NamespaceMapping.cs
- HttpListenerResponse.cs
- PropertyToken.cs
- FlowDocumentPaginator.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- MailWebEventProvider.cs
- VectorCollection.cs
- AutomationIdentifier.cs
- PrintPageEvent.cs
- SourceElementsCollection.cs
- RealizationDrawingContextWalker.cs
- PenLineCapValidation.cs
- CollectionsUtil.cs
- QueryTask.cs
- MailHeaderInfo.cs
- QilGenerator.cs
- BaseProcessProtocolHandler.cs
- TypeInfo.cs
- SystemParameters.cs
- Translator.cs
- Timeline.cs
- LocatorManager.cs
- SpeechUI.cs
- WebPartPersonalization.cs
- TableStyle.cs
- DelegatedStream.cs
- DesignUtil.cs
- XmlBinaryReaderSession.cs
- OdbcPermission.cs
- Cursor.cs
- SortQuery.cs
- SelectionListDesigner.cs
- MutableAssemblyCacheEntry.cs
- SharedPersonalizationStateInfo.cs
- HostingEnvironment.cs
- GifBitmapDecoder.cs
- ToolStripDesignerAvailabilityAttribute.cs
- serverconfig.cs
- AdornerDecorator.cs
- Vector3DIndependentAnimationStorage.cs
- CodeDirectoryCompiler.cs
- CodeStatement.cs