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
- HwndMouseInputProvider.cs
- MD5Cng.cs
- XmlSerializationWriter.cs
- KeyValuePair.cs
- AutoGeneratedFieldProperties.cs
- MenuRenderer.cs
- AppDomainShutdownMonitor.cs
- ASCIIEncoding.cs
- HtmlContainerControl.cs
- ProfessionalColorTable.cs
- AggregateException.cs
- CommentEmitter.cs
- XmlSchemaValidationException.cs
- BitmapDownload.cs
- DependencyPropertyChangedEventArgs.cs
- EventsTab.cs
- SqlUserDefinedAggregateAttribute.cs
- Filter.cs
- AssemblyResourceLoader.cs
- RequestCachingSection.cs
- Maps.cs
- PixelFormatConverter.cs
- DataGridItemEventArgs.cs
- GraphicsContext.cs
- RC2.cs
- DrawingState.cs
- XslAst.cs
- EqualityComparer.cs
- TextEditorSpelling.cs
- ReaderContextStackData.cs
- IsolatedStoragePermission.cs
- SoapEnvelopeProcessingElement.cs
- EarlyBoundInfo.cs
- TextEffectCollection.cs
- PropertySourceInfo.cs
- SchemaTableColumn.cs
- ConfigurationSectionCollection.cs
- OlePropertyStructs.cs
- TextBoxRenderer.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- IdentityHolder.cs
- RequestCacheManager.cs
- GcHandle.cs
- FontStretchConverter.cs
- EndpointNameMessageFilter.cs
- JsonEnumDataContract.cs
- LogicalTreeHelper.cs
- xdrvalidator.cs
- HtmlControl.cs
- Size3D.cs
- WizardSideBarListControlItemEventArgs.cs
- OutputCacheSettings.cs
- GreaterThanOrEqual.cs
- HMAC.cs
- FocusChangedEventArgs.cs
- TrackingRecord.cs
- ByeOperationCD1AsyncResult.cs
- NullableBoolConverter.cs
- Visual.cs
- GridViewAutomationPeer.cs
- MessageSecurityOverHttpElement.cs
- DataGridViewRowStateChangedEventArgs.cs
- IInstanceTable.cs
- XmlNavigatorFilter.cs
- safelink.cs
- Boolean.cs
- lengthconverter.cs
- RunInstallerAttribute.cs
- Selection.cs
- SafeMemoryMappedViewHandle.cs
- MsmqIntegrationElement.cs
- ManualResetEvent.cs
- ErrorsHelper.cs
- GlyphCache.cs
- GenericIdentity.cs
- FunctionDefinition.cs
- Odbc32.cs
- UserPreferenceChangingEventArgs.cs
- CodeIdentifier.cs
- HMACSHA256.cs
- ToolBarDesigner.cs
- ZeroOpNode.cs
- ChannelPool.cs
- RoutedCommand.cs
- InstanceStore.cs
- ListenerAdaptersInstallComponent.cs
- EntityContainerRelationshipSetEnd.cs
- ControllableStoryboardAction.cs
- CodeSnippetTypeMember.cs
- VisualBasicReference.cs
- MailMessageEventArgs.cs
- ArglessEventHandlerProxy.cs
- XmlNavigatorFilter.cs
- XmlDocumentSurrogate.cs
- ConfigurationPermission.cs
- ApplicationSettingsBase.cs
- MdImport.cs
- InvalidEnumArgumentException.cs
- EditingCommands.cs
- MultipleViewPatternIdentifiers.cs