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
- PerspectiveCamera.cs
- NeutralResourcesLanguageAttribute.cs
- ResourceReferenceExpressionConverter.cs
- DiscoveryClientDocuments.cs
- EnumBuilder.cs
- ScriptResourceHandler.cs
- FieldDescriptor.cs
- OleDbCommandBuilder.cs
- AutoSizeComboBox.cs
- Query.cs
- Panel.cs
- XmlWriter.cs
- ResourceSet.cs
- VectorAnimationBase.cs
- EntityType.cs
- LocationReference.cs
- StackBuilderSink.cs
- ObjectItemCollection.cs
- Console.cs
- MultipleViewProviderWrapper.cs
- UnsafeNativeMethods.cs
- DefaultMemberAttribute.cs
- DeferredTextReference.cs
- TargetParameterCountException.cs
- EmissiveMaterial.cs
- VariableQuery.cs
- EntityDataSourceDataSelection.cs
- HttpResponse.cs
- XmlCharCheckingWriter.cs
- TimeStampChecker.cs
- ProcessRequestAsyncResult.cs
- HitTestParameters3D.cs
- MultilineStringConverter.cs
- DBPropSet.cs
- Tablet.cs
- DesignerSerializationVisibilityAttribute.cs
- ObjectDataSourceSelectingEventArgs.cs
- PackageFilter.cs
- FormViewInsertedEventArgs.cs
- GenericWebPart.cs
- CompilerGeneratedAttribute.cs
- GridLength.cs
- QilBinary.cs
- MetafileEditor.cs
- DbConnectionStringCommon.cs
- AnchoredBlock.cs
- SoapReflector.cs
- recordstatescratchpad.cs
- FormatterConverter.cs
- BulletChrome.cs
- QilStrConcat.cs
- SafeMemoryMappedViewHandle.cs
- WindowsImpersonationContext.cs
- FileLoadException.cs
- RtfToXamlLexer.cs
- AutomationPeer.cs
- ExpressionVisitor.cs
- TextChangedEventArgs.cs
- Configuration.cs
- Rotation3DAnimationBase.cs
- AudioFormatConverter.cs
- DataTemplateSelector.cs
- FunctionQuery.cs
- Table.cs
- ScriptServiceAttribute.cs
- IsolatedStorageFilePermission.cs
- AttributeCollection.cs
- TakeOrSkipWhileQueryOperator.cs
- DataListCommandEventArgs.cs
- MessageSmuggler.cs
- ProfileWorkflowElement.cs
- ParentUndoUnit.cs
- GuidelineSet.cs
- FlowDocumentReaderAutomationPeer.cs
- InvalidAsynchronousStateException.cs
- TableCell.cs
- UTF8Encoding.cs
- ColorMap.cs
- AuthorizationRuleCollection.cs
- FieldBuilder.cs
- MouseEvent.cs
- QilPatternFactory.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- Cursor.cs
- CellNormalizer.cs
- UnionExpr.cs
- DetailsViewActionList.cs
- InternalSafeNativeMethods.cs
- CellPartitioner.cs
- XamlVector3DCollectionSerializer.cs
- ScriptBehaviorDescriptor.cs
- StandardOleMarshalObject.cs
- EntryWrittenEventArgs.cs
- SslStream.cs
- ColorPalette.cs
- JsonQueryStringConverter.cs
- SoapConverter.cs
- AsymmetricSignatureFormatter.cs
- QilValidationVisitor.cs
- BookmarkScope.cs