Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Common / FieldMetadata.cs / 2 / 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
- ClientRuntimeConfig.cs
- TextBounds.cs
- DbQueryCommandTree.cs
- SHA384Managed.cs
- HtmlInputText.cs
- AspNetSynchronizationContext.cs
- StreamWriter.cs
- MatcherBuilder.cs
- WindowsListBox.cs
- RelationshipConstraintValidator.cs
- SingleTagSectionHandler.cs
- Pair.cs
- Mutex.cs
- DropShadowEffect.cs
- CodeTypeDelegate.cs
- SqlDependencyUtils.cs
- _CommandStream.cs
- RelationshipManager.cs
- LambdaExpression.cs
- ZoomPercentageConverter.cs
- IpcChannelHelper.cs
- WebPageTraceListener.cs
- XmlSchemaDatatype.cs
- HwndMouseInputProvider.cs
- SafeSecurityHandles.cs
- DataGridViewRow.cs
- MetadataItemEmitter.cs
- TableItemPattern.cs
- UnmanagedMarshal.cs
- SecurityUtils.cs
- BufferedWebEventProvider.cs
- ProgressChangedEventArgs.cs
- ToolStripCodeDomSerializer.cs
- InfoCardBaseException.cs
- CompilationLock.cs
- RowUpdatingEventArgs.cs
- SafeHGlobalHandleCritical.cs
- DbProviderFactoriesConfigurationHandler.cs
- ToolStripDropDownButton.cs
- IDReferencePropertyAttribute.cs
- CodeTypeReference.cs
- OutputCacheModule.cs
- XmlQualifiedName.cs
- _FixedSizeReader.cs
- BaseDataBoundControl.cs
- SqlCrossApplyToCrossJoin.cs
- DocumentPageViewAutomationPeer.cs
- KeySplineConverter.cs
- BinaryFormatterWriter.cs
- QuarticEase.cs
- ItemAutomationPeer.cs
- TextChangedEventArgs.cs
- CompoundFileIOPermission.cs
- CompoundFileReference.cs
- ListBoxItemAutomationPeer.cs
- ExceptionValidationRule.cs
- FileAuthorizationModule.cs
- ListManagerBindingsCollection.cs
- RouteData.cs
- RelationshipType.cs
- AspNetRouteServiceHttpHandler.cs
- DeleteStoreRequest.cs
- TextElementCollection.cs
- CollectionCodeDomSerializer.cs
- MethodImplAttribute.cs
- ElementFactory.cs
- FlatButtonAppearance.cs
- ObjectCloneHelper.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- ErrorFormatter.cs
- BamlTreeMap.cs
- RelationshipDetailsCollection.cs
- BitmapDownload.cs
- TrackingProfileManager.cs
- SemanticBasicElement.cs
- Margins.cs
- ScriptControlDescriptor.cs
- dataSvcMapFileLoader.cs
- RSAPKCS1SignatureDeformatter.cs
- StreamGeometry.cs
- Drawing.cs
- FrameworkReadOnlyPropertyMetadata.cs
- FixedMaxHeap.cs
- TypeConverterAttribute.cs
- SecurityElement.cs
- BrowserCapabilitiesFactoryBase.cs
- Predicate.cs
- ScrollItemProviderWrapper.cs
- RoleService.cs
- BindingListCollectionView.cs
- ObjectNavigationPropertyMapping.cs
- DefaultValueAttribute.cs
- AutomationPattern.cs
- RewritingSimplifier.cs
- EntityDataSourceWizardForm.cs
- DecoderExceptionFallback.cs
- CharStorage.cs
- KeySpline.cs
- GetPageNumberCompletedEventArgs.cs
- XmlChildEnumerator.cs