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
- PieceNameHelper.cs
- SparseMemoryStream.cs
- XmlLanguage.cs
- MeasureData.cs
- AccessDataSource.cs
- SerializerDescriptor.cs
- CommandID.cs
- WinFormsUtils.cs
- HitTestResult.cs
- ApplicationManager.cs
- FacetEnabledSchemaElement.cs
- InvalidComObjectException.cs
- BidOverLoads.cs
- CreateParams.cs
- InvalidOleVariantTypeException.cs
- PointValueSerializer.cs
- NativeMethods.cs
- COAUTHIDENTITY.cs
- compensatingcollection.cs
- TdsEnums.cs
- DbgCompiler.cs
- Compiler.cs
- ZipFileInfo.cs
- DataGridViewBand.cs
- SqlConnectionStringBuilder.cs
- TreeIterator.cs
- DataBindingExpressionBuilder.cs
- XMLSyntaxException.cs
- MatrixAnimationBase.cs
- CharAnimationBase.cs
- ObjectListCommand.cs
- DateTimeOffsetConverter.cs
- ImageIndexConverter.cs
- DeploymentSection.cs
- DataGridViewCellConverter.cs
- IndentedWriter.cs
- ApplicationException.cs
- FormatterServices.cs
- StatusStrip.cs
- HttpResponse.cs
- TemplateManager.cs
- ParentUndoUnit.cs
- TimerElapsedEvenArgs.cs
- PasswordBox.cs
- SourceLineInfo.cs
- FragmentQueryKB.cs
- GridViewUpdatedEventArgs.cs
- Membership.cs
- JsonServiceDocumentSerializer.cs
- BeginStoryboard.cs
- DiagnosticsConfiguration.cs
- KnownColorTable.cs
- hresults.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- HtmlTableRow.cs
- ImageSource.cs
- RowParagraph.cs
- WindowsIPAddress.cs
- Facet.cs
- RoutedEventArgs.cs
- ProfilePropertySettings.cs
- MultiBindingExpression.cs
- ContentAlignmentEditor.cs
- FreezableDefaultValueFactory.cs
- PrivateFontCollection.cs
- WeakReference.cs
- UIElementIsland.cs
- SqlConnectionStringBuilder.cs
- DBSchemaTable.cs
- SafeLibraryHandle.cs
- SQLByteStorage.cs
- ValidationError.cs
- DataContract.cs
- DataObjectEventArgs.cs
- ShaderEffect.cs
- TextRangeBase.cs
- PersistenceMetadataNamespace.cs
- TextBox.cs
- WorkflowRuntime.cs
- FormViewPageEventArgs.cs
- ValidatingCollection.cs
- GridViewRowEventArgs.cs
- LeftCellWrapper.cs
- SplashScreenNativeMethods.cs
- DbParameterCollection.cs
- UriScheme.cs
- SerializationStore.cs
- ButtonBaseDesigner.cs
- DataContractSet.cs
- SqlConnectionHelper.cs
- Timer.cs
- CornerRadius.cs
- StatusBarPanelClickEvent.cs
- XmlResolver.cs
- WebServiceHost.cs
- DependentTransaction.cs
- SecurityDescriptor.cs
- Model3DCollection.cs
- MimeTypePropertyAttribute.cs
- PriorityRange.cs