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 / internal / materialization / recordstatescratchpad.cs / 1 / recordstatescratchpad.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
using System.Collections.Generic;
using System.Data.Metadata.Edm;
using System.Linq;
using System.Linq.Expressions;
namespace System.Data.Common.Internal.Materialization
{
///
/// Used in the Translator to aggregate information about a (nested) record
/// state. After the translator visits the columnMaps, it will compile
/// the recordState(s) which produces an immutable RecordStateFactory that
/// can be shared amongst many query instances.
///
internal class RecordStateScratchpad
{
private int _stateSlotNumber;
internal int StateSlotNumber
{
get { return _stateSlotNumber; }
set { _stateSlotNumber = value; }
}
private int _columnCount;
internal int ColumnCount
{
get { return _columnCount; }
set { _columnCount = value; }
}
private DataRecordInfo _dataRecordInfo;
internal DataRecordInfo DataRecordInfo
{
get { return _dataRecordInfo; }
set { _dataRecordInfo = value; }
}
private Expression _gatherData;
internal Expression GatherData
{
get { return _gatherData; }
set { _gatherData = value; }
}
private string[] _propertyNames;
internal string[] PropertyNames
{
get { return _propertyNames; }
set { _propertyNames = value; }
}
private TypeUsage[] _typeUsages;
internal TypeUsage[] TypeUsages
{
get { return _typeUsages; }
set { _typeUsages = value; }
}
private List _nestedRecordStateScratchpads = new List();
internal RecordStateFactory Compile()
{
RecordStateFactory[] nestedRecordStateFactories = new RecordStateFactory[_nestedRecordStateScratchpads.Count];
for (int i = 0; i < nestedRecordStateFactories.Length; i++)
{
nestedRecordStateFactories[i] = _nestedRecordStateScratchpads[i].Compile();
}
RecordStateFactory result = (RecordStateFactory)Activator.CreateInstance(typeof(RecordStateFactory), new object[] {
this.StateSlotNumber,
this.ColumnCount,
nestedRecordStateFactories,
this.DataRecordInfo,
this.GatherData,
this.PropertyNames,
this.TypeUsages
});
return result;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
using System.Collections.Generic;
using System.Data.Metadata.Edm;
using System.Linq;
using System.Linq.Expressions;
namespace System.Data.Common.Internal.Materialization
{
///
/// Used in the Translator to aggregate information about a (nested) record
/// state. After the translator visits the columnMaps, it will compile
/// the recordState(s) which produces an immutable RecordStateFactory that
/// can be shared amongst many query instances.
///
internal class RecordStateScratchpad
{
private int _stateSlotNumber;
internal int StateSlotNumber
{
get { return _stateSlotNumber; }
set { _stateSlotNumber = value; }
}
private int _columnCount;
internal int ColumnCount
{
get { return _columnCount; }
set { _columnCount = value; }
}
private DataRecordInfo _dataRecordInfo;
internal DataRecordInfo DataRecordInfo
{
get { return _dataRecordInfo; }
set { _dataRecordInfo = value; }
}
private Expression _gatherData;
internal Expression GatherData
{
get { return _gatherData; }
set { _gatherData = value; }
}
private string[] _propertyNames;
internal string[] PropertyNames
{
get { return _propertyNames; }
set { _propertyNames = value; }
}
private TypeUsage[] _typeUsages;
internal TypeUsage[] TypeUsages
{
get { return _typeUsages; }
set { _typeUsages = value; }
}
private List _nestedRecordStateScratchpads = new List();
internal RecordStateFactory Compile()
{
RecordStateFactory[] nestedRecordStateFactories = new RecordStateFactory[_nestedRecordStateScratchpads.Count];
for (int i = 0; i < nestedRecordStateFactories.Length; i++)
{
nestedRecordStateFactories[i] = _nestedRecordStateScratchpads[i].Compile();
}
RecordStateFactory result = (RecordStateFactory)Activator.CreateInstance(typeof(RecordStateFactory), new object[] {
this.StateSlotNumber,
this.ColumnCount,
nestedRecordStateFactories,
this.DataRecordInfo,
this.GatherData,
this.PropertyNames,
this.TypeUsages
});
return result;
}
}
}
// 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
- CaseStatement.cs
- Operators.cs
- ParamArrayAttribute.cs
- SymLanguageType.cs
- FlowDocument.cs
- CustomErrorCollection.cs
- EdmType.cs
- Scheduler.cs
- TableRowCollection.cs
- EntityTransaction.cs
- XmlLanguageConverter.cs
- DbConnectionClosed.cs
- DocumentGridContextMenu.cs
- AmbientLight.cs
- EnumMember.cs
- TypeDescriptionProvider.cs
- ReadOnlyTernaryTree.cs
- ImageBrush.cs
- DriveInfo.cs
- Visual3D.cs
- CorruptingExceptionCommon.cs
- FormViewUpdatedEventArgs.cs
- PropertyCollection.cs
- ProfilePropertySettingsCollection.cs
- SrgsDocument.cs
- TextParagraph.cs
- ObjectTypeMapping.cs
- WebHttpDispatchOperationSelector.cs
- ToolBarDesigner.cs
- KnownColorTable.cs
- StackSpiller.cs
- AppLevelCompilationSectionCache.cs
- Popup.cs
- SqlNodeAnnotation.cs
- BuildProvidersCompiler.cs
- FileRegion.cs
- WebPartActionVerb.cs
- InProcStateClientManager.cs
- dataSvcMapFileLoader.cs
- AddInAdapter.cs
- DataSysAttribute.cs
- FormsAuthentication.cs
- ItemsControl.cs
- DataIdProcessor.cs
- PhysicalFontFamily.cs
- FilterElement.cs
- ReceiveCompletedEventArgs.cs
- SymbolType.cs
- SqlDataSourceEnumerator.cs
- RuntimeConfig.cs
- StylusPointPropertyId.cs
- EntityDataSourceEntitySetNameItem.cs
- IList.cs
- DbDataAdapter.cs
- GenericTransactionFlowAttribute.cs
- XmlWrappingReader.cs
- StringReader.cs
- BamlLocalizableResource.cs
- Marshal.cs
- StringSorter.cs
- ReadOnlyHierarchicalDataSource.cs
- TypeConstant.cs
- ControlCommandSet.cs
- DataControlFieldCollection.cs
- IdleTimeoutMonitor.cs
- DataColumnChangeEvent.cs
- selecteditemcollection.cs
- EncryptedHeader.cs
- XmlCharCheckingWriter.cs
- WorkflowExecutor.cs
- ConnectionStringSettings.cs
- DataRow.cs
- DataList.cs
- Collection.cs
- ExpressionPrefixAttribute.cs
- NativeMethods.cs
- WindowVisualStateTracker.cs
- DbConnectionFactory.cs
- _BufferOffsetSize.cs
- LogExtentCollection.cs
- PaperSource.cs
- NamespaceListProperty.cs
- DynamicValueConverter.cs
- OracleBFile.cs
- MergeExecutor.cs
- SendMailErrorEventArgs.cs
- oledbmetadatacolumnnames.cs
- Trace.cs
- SettingsPropertyIsReadOnlyException.cs
- ValidationHelper.cs
- SolidColorBrush.cs
- TemplateBindingExpressionConverter.cs
- IncrementalReadDecoders.cs
- MultipartContentParser.cs
- PropertyPathConverter.cs
- HtmlImage.cs
- BigInt.cs
- HScrollBar.cs
- InputProcessorProfiles.cs
- GroupStyle.cs