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
- TaiwanLunisolarCalendar.cs
- Crc32.cs
- ThemeDirectoryCompiler.cs
- MarkupCompilePass1.cs
- StringFreezingAttribute.cs
- UdpTransportSettings.cs
- MimeMapping.cs
- GenerateHelper.cs
- FixUp.cs
- RemotingException.cs
- HtmlInputCheckBox.cs
- ExtractorMetadata.cs
- XmlAttributeCollection.cs
- EncryptedData.cs
- EventlogProvider.cs
- VirtualizedItemPattern.cs
- CustomTypeDescriptor.cs
- Calendar.cs
- QilPatternFactory.cs
- Msmq4SubqueuePoisonHandler.cs
- OpenFileDialog.cs
- EnterpriseServicesHelper.cs
- TextPointer.cs
- WorkflowMarkupSerializationProvider.cs
- HandledEventArgs.cs
- storepermissionattribute.cs
- Span.cs
- TranslateTransform3D.cs
- IsolationInterop.cs
- AppSettingsSection.cs
- OpCodes.cs
- EdmItemCollection.OcAssemblyCache.cs
- AsyncResult.cs
- HTMLTagNameToTypeMapper.cs
- ColorTransform.cs
- TableAutomationPeer.cs
- ToolStripTextBox.cs
- NameValuePair.cs
- SHA1Cng.cs
- SmiSettersStream.cs
- SamlSecurityToken.cs
- DEREncoding.cs
- FlowDocument.cs
- PageStatePersister.cs
- PropertyPathWorker.cs
- SRDisplayNameAttribute.cs
- InputScope.cs
- AuthenticodeSignatureInformation.cs
- AnnouncementEndpointElement.cs
- DataKeyArray.cs
- EntityContainer.cs
- ParentUndoUnit.cs
- MailMessage.cs
- NativeMethodsCLR.cs
- StateDesigner.Layouts.cs
- DrawingVisualDrawingContext.cs
- CSharpCodeProvider.cs
- ButtonStandardAdapter.cs
- ZipIOBlockManager.cs
- SqlReorderer.cs
- EncodingTable.cs
- StringDictionaryWithComparer.cs
- CallContext.cs
- IUnknownConstantAttribute.cs
- GridLengthConverter.cs
- MarkupCompilePass2.cs
- CustomAttributeBuilder.cs
- SimpleApplicationHost.cs
- ContentAlignmentEditor.cs
- RightsManagementUser.cs
- DesignDataSource.cs
- BatchParser.cs
- DXD.cs
- HandleCollector.cs
- PaintEvent.cs
- HttpConfigurationContext.cs
- SiteMapPath.cs
- ComponentEditorForm.cs
- XmlSequenceWriter.cs
- BindingCollection.cs
- IResourceProvider.cs
- DllNotFoundException.cs
- WebEvents.cs
- StorageMappingItemCollection.cs
- NativeMethods.cs
- ServiceDescription.cs
- PropertyStore.cs
- Expression.cs
- SamlSerializer.cs
- RenderTargetBitmap.cs
- TextAnchor.cs
- ProcessMonitor.cs
- SqlDataSourceSelectingEventArgs.cs
- EventWaitHandleSecurity.cs
- TrackingQueryElement.cs
- ContextMenuStripGroup.cs
- Imaging.cs
- OutputCacheModule.cs
- KeyedHashAlgorithm.cs
- ExtensionsSection.cs