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
- NameHandler.cs
- OrderingQueryOperator.cs
- HwndSource.cs
- COM2AboutBoxPropertyDescriptor.cs
- PasswordRecovery.cs
- _ConnectStream.cs
- WebServiceHandler.cs
- EventDescriptorCollection.cs
- UnsafeNativeMethods.cs
- EditorPart.cs
- XmlIncludeAttribute.cs
- RowsCopiedEventArgs.cs
- DSASignatureFormatter.cs
- _FixedSizeReader.cs
- DiscreteKeyFrames.cs
- Expression.DebuggerProxy.cs
- InputManager.cs
- ByteStorage.cs
- PolyLineSegment.cs
- precedingquery.cs
- LocationChangedEventArgs.cs
- SrgsToken.cs
- WindowsFormsSectionHandler.cs
- GridViewCommandEventArgs.cs
- NonceCache.cs
- TdsEnums.cs
- Rect.cs
- BinaryMessageEncodingElement.cs
- DirectoryInfo.cs
- JapaneseCalendar.cs
- VirtualPath.cs
- EpmContentSerializerBase.cs
- AuditLogLocation.cs
- Utils.cs
- SizeConverter.cs
- UIInitializationException.cs
- InvalidAsynchronousStateException.cs
- XmlWrappingReader.cs
- ActivityInfo.cs
- SafeNativeMethodsCLR.cs
- XmlSchemaRedefine.cs
- Int16.cs
- TdsParameterSetter.cs
- datacache.cs
- InlineUIContainer.cs
- NetCodeGroup.cs
- FontDriver.cs
- XPathExpr.cs
- LoginView.cs
- Transform.cs
- PeerCredential.cs
- OletxTransactionManager.cs
- EntityDataSourceContainerNameItem.cs
- BypassElement.cs
- Int32Storage.cs
- NonceCache.cs
- StringUtil.cs
- BookmarkUndoUnit.cs
- PermissionSet.cs
- PropertyChangedEventManager.cs
- GraphicsPath.cs
- DataServiceHost.cs
- ZipIOExtraField.cs
- DataGridPageChangedEventArgs.cs
- Menu.cs
- ResponseStream.cs
- EncoderParameter.cs
- ButtonStandardAdapter.cs
- HttpCacheParams.cs
- TakeQueryOptionExpression.cs
- StringSorter.cs
- FixedTextContainer.cs
- XAMLParseException.cs
- XamlTypeWithExplicitNamespace.cs
- BufferBuilder.cs
- HwndProxyElementProvider.cs
- BitStack.cs
- XmlSchemaGroup.cs
- CodeMemberMethod.cs
- ExpressionEditor.cs
- SerializationInfo.cs
- DecimalAverageAggregationOperator.cs
- KnownTypesHelper.cs
- PageParserFilter.cs
- WorkflowApplicationIdleEventArgs.cs
- Vector3D.cs
- Parser.cs
- FastEncoderWindow.cs
- SimpleMailWebEventProvider.cs
- VScrollBar.cs
- WorkflowShape.cs
- ElementsClipboardData.cs
- ExpressionHelper.cs
- TaskDesigner.cs
- DataGridViewLinkColumn.cs
- EndpointDiscoveryElement.cs
- FtpWebRequest.cs
- TextEndOfLine.cs
- _CookieModule.cs
- XPathCompiler.cs