Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / internal / materialization / recordstatescratchpad.cs / 1599186 / 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; using System.Runtime.CompilerServices; 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 (); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] 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; using System.Runtime.CompilerServices; 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 (); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] 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
- FieldNameLookup.cs
- Pair.cs
- TimeSpanConverter.cs
- ExtensionDataObject.cs
- HashAlgorithm.cs
- CustomPopupPlacement.cs
- SimpleRecyclingCache.cs
- ObjectStateEntry.cs
- COM2IDispatchConverter.cs
- OdbcStatementHandle.cs
- XmlSchemaSequence.cs
- SelectedDatesCollection.cs
- SourceFileInfo.cs
- Image.cs
- RolePrincipal.cs
- EpmAttributeNameBuilder.cs
- GPPOINTF.cs
- FileClassifier.cs
- SqlOuterApplyReducer.cs
- Mapping.cs
- SqlDependencyUtils.cs
- TypedRowGenerator.cs
- UInt16Storage.cs
- OdbcConnectionFactory.cs
- CreatingCookieEventArgs.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- IdentityVerifier.cs
- DrawingAttributesDefaultValueFactory.cs
- TagPrefixInfo.cs
- EventSchemaTraceListener.cs
- TableItemStyle.cs
- CrossAppDomainChannel.cs
- AnnotationHighlightLayer.cs
- XPathSelfQuery.cs
- XPathMessageFilter.cs
- NetCodeGroup.cs
- ConfigXmlComment.cs
- PersonalizationProviderCollection.cs
- Type.cs
- Trigger.cs
- VariantWrapper.cs
- SmtpFailedRecipientsException.cs
- Int16Converter.cs
- TeredoHelper.cs
- DispatcherSynchronizationContext.cs
- JapaneseCalendar.cs
- _CookieModule.cs
- BitmapScalingModeValidation.cs
- IsolationInterop.cs
- ModuleBuilder.cs
- Hash.cs
- BinaryCommonClasses.cs
- SponsorHelper.cs
- ExpressionBindingCollection.cs
- QilGeneratorEnv.cs
- SimpleWebHandlerParser.cs
- ConversionValidationRule.cs
- DbParameterCollectionHelper.cs
- CompositeControl.cs
- TextMarkerSource.cs
- PackageRelationshipCollection.cs
- DynamicPhysicalDiscoSearcher.cs
- Monitor.cs
- DeclaredTypeValidatorAttribute.cs
- BrushValueSerializer.cs
- ChtmlFormAdapter.cs
- PolyQuadraticBezierSegment.cs
- WrapperEqualityComparer.cs
- Nullable.cs
- ValueUnavailableException.cs
- EffectiveValueEntry.cs
- WpfXamlLoader.cs
- UiaCoreApi.cs
- XmlAttributeAttribute.cs
- CatalogPartChrome.cs
- IPAddress.cs
- Logging.cs
- JpegBitmapEncoder.cs
- ManagementObjectSearcher.cs
- ContentValidator.cs
- SelectionPattern.cs
- IssuanceLicense.cs
- _FixedSizeReader.cs
- Delegate.cs
- Axis.cs
- Authorization.cs
- QueryCreatedEventArgs.cs
- CalendarDay.cs
- DataGridViewAutoSizeModeEventArgs.cs
- RegistryConfigurationProvider.cs
- BaseResourcesBuildProvider.cs
- ToolboxItemFilterAttribute.cs
- CharacterHit.cs
- IndicCharClassifier.cs
- HyperLinkField.cs
- MemoryFailPoint.cs
- DrawToolTipEventArgs.cs
- TabControl.cs
- JulianCalendar.cs
- MatrixTransform.cs