Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / Reflection / Emit / ParameterToken.cs / 1 / ParameterToken.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: ParameterToken
**
**
** Purpose: metadata tokens for a parameter
**
**
===========================================================*/
namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security.Permissions;
// The ParameterToken class is an opaque representation of the Token returned
// by the Metadata to represent the parameter.
[Serializable()]
[System.Runtime.InteropServices.ComVisible(true)]
public struct ParameterToken {
public static readonly ParameterToken Empty = new ParameterToken();
internal int m_tkParameter;
#if false
public ParameterToken() {
m_tkParameter=0;
}
#endif
internal ParameterToken(int tkParam) {
m_tkParameter = tkParam;
}
public int Token {
get { return m_tkParameter; }
}
public override int GetHashCode()
{
return m_tkParameter;
}
public override bool Equals(Object obj)
{
if (obj is ParameterToken)
return Equals((ParameterToken)obj);
else
return false;
}
public bool Equals(ParameterToken obj)
{
return obj.m_tkParameter == m_tkParameter;
}
public static bool operator ==(ParameterToken a, ParameterToken b)
{
return a.Equals(b);
}
public static bool operator !=(ParameterToken a, ParameterToken b)
{
return !(a == b);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: ParameterToken
**
**
** Purpose: metadata tokens for a parameter
**
**
===========================================================*/
namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security.Permissions;
// The ParameterToken class is an opaque representation of the Token returned
// by the Metadata to represent the parameter.
[Serializable()]
[System.Runtime.InteropServices.ComVisible(true)]
public struct ParameterToken {
public static readonly ParameterToken Empty = new ParameterToken();
internal int m_tkParameter;
#if false
public ParameterToken() {
m_tkParameter=0;
}
#endif
internal ParameterToken(int tkParam) {
m_tkParameter = tkParam;
}
public int Token {
get { return m_tkParameter; }
}
public override int GetHashCode()
{
return m_tkParameter;
}
public override bool Equals(Object obj)
{
if (obj is ParameterToken)
return Equals((ParameterToken)obj);
else
return false;
}
public bool Equals(ParameterToken obj)
{
return obj.m_tkParameter == m_tkParameter;
}
public static bool operator ==(ParameterToken a, ParameterToken b)
{
return a.Equals(b);
}
public static bool operator !=(ParameterToken a, ParameterToken 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
- ObjectReferenceStack.cs
- AutomationPattern.cs
- TagPrefixAttribute.cs
- Constants.cs
- DataBindingExpressionBuilder.cs
- DataBindingExpressionBuilder.cs
- RelatedView.cs
- PaperSource.cs
- StringUtil.cs
- SharedStream.cs
- ExtensionElementCollection.cs
- SqlTypesSchemaImporter.cs
- ColorKeyFrameCollection.cs
- Column.cs
- Win32SafeHandles.cs
- TextSpan.cs
- UIInitializationException.cs
- Ops.cs
- httpapplicationstate.cs
- ColumnMapProcessor.cs
- CounterCreationData.cs
- BamlBinaryWriter.cs
- CodeAttributeDeclaration.cs
- LocalizableAttribute.cs
- WindowsContainer.cs
- ChannelToken.cs
- BindToObject.cs
- newinstructionaction.cs
- UrlMappingsSection.cs
- FixedDocumentSequencePaginator.cs
- HttpContextServiceHost.cs
- ComponentDispatcherThread.cs
- LicenseException.cs
- JsonObjectDataContract.cs
- initElementDictionary.cs
- CreateInstanceBinder.cs
- TraceHandlerErrorFormatter.cs
- SemanticTag.cs
- TextRangeSerialization.cs
- PolyLineSegmentFigureLogic.cs
- MetadataPropertyvalue.cs
- WindowsTreeView.cs
- PartBasedPackageProperties.cs
- ApplicationSettingsBase.cs
- WindowsStartMenu.cs
- ResourcesBuildProvider.cs
- StrokeCollection2.cs
- MimeReturn.cs
- NetworkInformationException.cs
- DataColumnMappingCollection.cs
- XmlMapping.cs
- UdpMessageProperty.cs
- WmlSelectionListAdapter.cs
- FontUnit.cs
- CollectionViewGroupInternal.cs
- XamlClipboardData.cs
- RuntimeConfigLKG.cs
- ContractUtils.cs
- GlobalizationSection.cs
- StringStorage.cs
- BitmapPalettes.cs
- CheckBoxField.cs
- TakeOrSkipWhileQueryOperator.cs
- DecoderNLS.cs
- ScalarRestriction.cs
- DataGridAddNewRow.cs
- EDesignUtil.cs
- AuthenticationConfig.cs
- DataGridViewCheckBoxColumn.cs
- AlphabeticalEnumConverter.cs
- ImmComposition.cs
- IdentifierService.cs
- XmlIgnoreAttribute.cs
- ScrollBar.cs
- DescriptionAttribute.cs
- Win32MouseDevice.cs
- StyleCollectionEditor.cs
- MediaTimeline.cs
- UrlMappingCollection.cs
- ExtentKey.cs
- ToolboxCategory.cs
- PermissionSet.cs
- QuotaExceededException.cs
- EventsTab.cs
- UndoEngine.cs
- NamespaceMapping.cs
- PropertyGridDesigner.cs
- MonitorWrapper.cs
- TreeNodeClickEventArgs.cs
- JsonEncodingStreamWrapper.cs
- AttachInfo.cs
- Rotation3D.cs
- Expander.cs
- OdbcEnvironment.cs
- TransactionInterop.cs
- NotSupportedException.cs
- Polygon.cs
- CurrentChangingEventManager.cs
- ReadOnlyDictionary.cs
- ObjectDataSourceStatusEventArgs.cs