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
- ServerValidateEventArgs.cs
- RSAPKCS1SignatureFormatter.cs
- FreeIndexList.cs
- TreeViewItem.cs
- HtmlButton.cs
- SessionPageStatePersister.cs
- WebPartExportVerb.cs
- PartitionedStream.cs
- ZeroOpNode.cs
- ReferenceService.cs
- EntityDataSourceView.cs
- OpenTypeLayoutCache.cs
- ServiceDescriptionSerializer.cs
- RuntimeHelpers.cs
- StandardCommands.cs
- ListControl.cs
- CornerRadiusConverter.cs
- EffectiveValueEntry.cs
- XamlSerializerUtil.cs
- AccessedThroughPropertyAttribute.cs
- AsnEncodedData.cs
- QuotedPrintableStream.cs
- Context.cs
- BinaryParser.cs
- DataGridItem.cs
- PartialCachingAttribute.cs
- BitmapEffectDrawing.cs
- CalendarAutoFormat.cs
- WhereaboutsReader.cs
- Matrix3DConverter.cs
- MediaScriptCommandRoutedEventArgs.cs
- PrivacyNoticeElement.cs
- UserControl.cs
- JsonXmlDataContract.cs
- Matrix3D.cs
- Base64Stream.cs
- ZipIOFileItemStream.cs
- ToolStripDropDownClosingEventArgs.cs
- BindingsCollection.cs
- ByteArrayHelperWithString.cs
- EventItfInfo.cs
- VSWCFServiceContractGenerator.cs
- LogicalExpr.cs
- EmbeddedMailObject.cs
- ThicknessAnimationBase.cs
- FontNamesConverter.cs
- ExtenderControl.cs
- TrustLevel.cs
- Model3DCollection.cs
- EntityConnectionStringBuilder.cs
- ClientUtils.cs
- ReferenceEqualityComparer.cs
- ToolStripGrip.cs
- WebPageTraceListener.cs
- DataGridLengthConverter.cs
- ProvidePropertyAttribute.cs
- MSG.cs
- XmlSchemaParticle.cs
- UserInitiatedNavigationPermission.cs
- regiisutil.cs
- TemplateXamlParser.cs
- CancelRequestedRecord.cs
- WorkflowPrinting.cs
- EntitySetDataBindingList.cs
- ClassDataContract.cs
- SizeChangedEventArgs.cs
- DataSourceControlBuilder.cs
- HttpPostProtocolImporter.cs
- relpropertyhelper.cs
- SizeAnimationClockResource.cs
- TextMetrics.cs
- HelpFileFileNameEditor.cs
- IdentityNotMappedException.cs
- Imaging.cs
- LayoutTableCell.cs
- LabelLiteral.cs
- LocalizableResourceBuilder.cs
- SingleAnimation.cs
- DataGridHyperlinkColumn.cs
- Win32PrintDialog.cs
- XmlNullResolver.cs
- CapabilitiesUse.cs
- RelationshipEnd.cs
- CheckBoxList.cs
- ListViewSelectEventArgs.cs
- XmlHelper.cs
- MorphHelpers.cs
- ToolStripPanel.cs
- ClientTargetCollection.cs
- TiffBitmapEncoder.cs
- ToolStripMenuItem.cs
- QuaternionAnimationUsingKeyFrames.cs
- QueueProcessor.cs
- XmlArrayItemAttribute.cs
- AuthenticationService.cs
- XmlTextReaderImplHelpers.cs
- MatrixTransform.cs
- KeyValueConfigurationElement.cs
- ConfigurationValue.cs
- StringCollection.cs