Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Common / FieldMetadata.cs / 1 / FieldMetadata.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Data.Common {
using System.Data;
using System.Data.Metadata.Edm;
///
/// FieldMetadata class providing the correlation between the column ordinals and MemberMetadata.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
public struct FieldMetadata {
private readonly EdmMember _fieldType;
private readonly int _ordinal;
///
/// Used to construct a field metadata object relating a column ordinal and an ImemberMetadata.
///
/// Column oridnal
/// Metadata member
public FieldMetadata(int ordinal, EdmMember fieldType) {
if (ordinal < 0) {
throw EntityUtil.ArgumentOutOfRange("ordinal");
}
if (null == fieldType) {
throw EntityUtil.ArgumentNull("fieldType");
}
_fieldType = fieldType;
_ordinal = ordinal;
}
///
/// Metadata member.
///
public EdmMember FieldType {
get {
return _fieldType;
}
}
///
/// Column ordinal.
///
public int Ordinal {
get {
return _ordinal;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Data.Common {
using System.Data;
using System.Data.Metadata.Edm;
///
/// FieldMetadata class providing the correlation between the column ordinals and MemberMetadata.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
public struct FieldMetadata {
private readonly EdmMember _fieldType;
private readonly int _ordinal;
///
/// Used to construct a field metadata object relating a column ordinal and an ImemberMetadata.
///
/// Column oridnal
/// Metadata member
public FieldMetadata(int ordinal, EdmMember fieldType) {
if (ordinal < 0) {
throw EntityUtil.ArgumentOutOfRange("ordinal");
}
if (null == fieldType) {
throw EntityUtil.ArgumentNull("fieldType");
}
_fieldType = fieldType;
_ordinal = ordinal;
}
///
/// Metadata member.
///
public EdmMember FieldType {
get {
return _fieldType;
}
}
///
/// Column ordinal.
///
public int Ordinal {
get {
return _ordinal;
}
}
}
}
// 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
- FramingChannels.cs
- DBSqlParserColumnCollection.cs
- InheritedPropertyChangedEventArgs.cs
- PropertyInformation.cs
- NodeLabelEditEvent.cs
- _AuthenticationState.cs
- FilterEventArgs.cs
- IResourceProvider.cs
- SendKeys.cs
- ADConnectionHelper.cs
- MetadataException.cs
- LineServices.cs
- PointCollection.cs
- SourceElementsCollection.cs
- GcSettings.cs
- Decimal.cs
- basenumberconverter.cs
- ToolStripItemDataObject.cs
- StorageEntityTypeMapping.cs
- WmiPutTraceRecord.cs
- QueryLifecycle.cs
- Label.cs
- KeyValueConfigurationCollection.cs
- HttpWrapper.cs
- StrokeCollectionDefaultValueFactory.cs
- Image.cs
- ProfileProvider.cs
- GeneralTransform3DTo2DTo3D.cs
- GridViewColumn.cs
- BaseCodePageEncoding.cs
- InvokeDelegate.cs
- NamespaceCollection.cs
- MaterialGroup.cs
- LingerOption.cs
- SqlDataSource.cs
- DbBuffer.cs
- WeakReferenceList.cs
- SeverityFilter.cs
- DeleteBookmarkScope.cs
- AttributeData.cs
- HttpStreamXmlDictionaryWriter.cs
- Win32Native.cs
- SymmetricAlgorithm.cs
- ContextStaticAttribute.cs
- NavigatorOutput.cs
- QueryOperator.cs
- AutomationPeer.cs
- LayoutUtils.cs
- VirtualizingPanel.cs
- RightNameExpirationInfoPair.cs
- WebBrowser.cs
- DefinitionUpdate.cs
- OleDbStruct.cs
- CounterSample.cs
- XmlDataProvider.cs
- XmlRootAttribute.cs
- EntityViewGenerationConstants.cs
- DocumentScope.cs
- ElapsedEventArgs.cs
- TextParagraphProperties.cs
- ListViewContainer.cs
- _NegoState.cs
- XmlRawWriterWrapper.cs
- ClickablePoint.cs
- XmlCustomFormatter.cs
- BuilderPropertyEntry.cs
- HashHelper.cs
- SmtpFailedRecipientsException.cs
- FontInfo.cs
- FontSourceCollection.cs
- TextTreeRootTextBlock.cs
- MembershipValidatePasswordEventArgs.cs
- SqlTriggerContext.cs
- LineServicesCallbacks.cs
- WsdlImporter.cs
- WorkflowApplicationCompletedException.cs
- DataGridViewRowEventArgs.cs
- WorkflowWebHostingModule.cs
- RotateTransform.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- NotifyCollectionChangedEventArgs.cs
- WorkflowServiceAttributes.cs
- TypeKeyValue.cs
- _RegBlobWebProxyDataBuilder.cs
- ReflectionHelper.cs
- shaper.cs
- PassportPrincipal.cs
- Rectangle.cs
- __Filters.cs
- FormClosingEvent.cs
- DrawingAttributeSerializer.cs
- NativeObjectSecurity.cs
- TextCharacters.cs
- OletxTransactionHeader.cs
- SessionStateModule.cs
- WaitingCursor.cs
- FloaterParaClient.cs
- FtpWebRequest.cs
- DriveInfo.cs
- TableHeaderCell.cs