Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / CommandTrees / ExpressionBuilder / Row.cs / 1305376 / Row.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Collections.Generic;
using System.Data.Common.CommandTrees;
using System.Data.Common.Utils;
namespace System.Data.Common.CommandTrees.ExpressionBuilder
{
///
/// The Row class is intended to provide a constructor-like means of calling .
///
internal sealed class Row
{
private readonly System.Collections.ObjectModel.ReadOnlyCollection> arguments;
///
/// Constructs a new Row with the specified first column value and optional successive column values
///
/// A key-value pair that provides the first column in the new row instance (required)
/// Key-value pairs that provide any subsequent columns in the new row instance (optional)
public Row(KeyValuePair columnValue, params KeyValuePair[] columnValues)
{
this.arguments = new System.Collections.ObjectModel.ReadOnlyCollection>(Helpers.Prepend(columnValues, columnValue));
}
///
/// Creates a new that constructs a new row based on the columns
/// contained in this Row instance.
///
/// A new DbNewInstanceExpression that constructs a row with the same column names and DbExpression values as this Row instance
///
public DbNewInstanceExpression ToExpression()
{
return DbExpressionBuilder.NewRow(this.arguments);
}
///
/// Converts the given Row instance into an instance of
///
///
/// A DbExpression based on the Row instance
/// is null.
///
public static implicit operator DbExpression(Row row)
{
EntityUtil.CheckArgumentNull(row, "row");
return row.ToExpression();
}
}
}
// 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
- _BufferOffsetSize.cs
- StringKeyFrameCollection.cs
- StreamGeometry.cs
- PropertyStore.cs
- MessageFormatterConverter.cs
- MobileTemplatedControlDesigner.cs
- AutomationProperty.cs
- DataGridColumnHeader.cs
- HyperLinkDataBindingHandler.cs
- DesignerActionService.cs
- LassoSelectionBehavior.cs
- HtmlWindow.cs
- MasterPage.cs
- MultiViewDesigner.cs
- HintTextConverter.cs
- SchemaCollectionCompiler.cs
- ValidationException.cs
- DesignSurfaceCollection.cs
- Int32Rect.cs
- BinarySerializer.cs
- UInt16.cs
- BindValidationContext.cs
- WindowsContainer.cs
- PageDeviceFont.cs
- XmlCharCheckingWriter.cs
- MonthCalendar.cs
- PlatformCulture.cs
- ConditionalAttribute.cs
- TableParaClient.cs
- EventSetter.cs
- WebPartZoneAutoFormat.cs
- IntellisenseTextBox.designer.cs
- BinaryReader.cs
- Persist.cs
- X509DefaultServiceCertificateElement.cs
- TextTreePropertyUndoUnit.cs
- DataGridViewLinkCell.cs
- TabletCollection.cs
- FileSystemEventArgs.cs
- DataTemplateSelector.cs
- ClientTarget.cs
- Decimal.cs
- ClearTypeHintValidation.cs
- ToolBarButtonClickEvent.cs
- WSSecurityPolicy12.cs
- SafeNativeMethods.cs
- ComponentSerializationService.cs
- SqlXmlStorage.cs
- BrowserCapabilitiesCompiler.cs
- EventMemberCodeDomSerializer.cs
- TabItemWrapperAutomationPeer.cs
- XslAst.cs
- ParamArrayAttribute.cs
- LineSegment.cs
- NetworkInformationException.cs
- EncoderNLS.cs
- PrintControllerWithStatusDialog.cs
- RsaSecurityKey.cs
- indexingfiltermarshaler.cs
- bindurihelper.cs
- DescendantBaseQuery.cs
- ProxyWebPartConnectionCollection.cs
- TreeNodeStyle.cs
- KerberosReceiverSecurityToken.cs
- PointLight.cs
- ToolTip.cs
- FontTypeConverter.cs
- AttributeSetAction.cs
- WindowsImpersonationContext.cs
- MessageHeaderDescriptionCollection.cs
- FunctionDescription.cs
- OutputCacheSettingsSection.cs
- ISAPIWorkerRequest.cs
- UserUseLicenseDictionaryLoader.cs
- OdbcError.cs
- DataGridTableCollection.cs
- linebase.cs
- OleDbInfoMessageEvent.cs
- TextRunCacheImp.cs
- VariantWrapper.cs
- MetadataSource.cs
- URLAttribute.cs
- TraceInternal.cs
- FieldNameLookup.cs
- SignHashRequest.cs
- FunctionDetailsReader.cs
- TimelineGroup.cs
- SchemaType.cs
- PasswordRecoveryAutoFormat.cs
- UInt32Storage.cs
- X509CertificateValidator.cs
- SignatureHelper.cs
- ClientUtils.cs
- ResourceType.cs
- ReplacementText.cs
- Int64Converter.cs
- SecondaryViewProvider.cs
- ProxyWebPartManager.cs
- NullRuntimeConfig.cs
- ConfigurationSettings.cs