Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / internal / materialization / shaperfactory.cs / 1599186 / shaperfactory.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- using System.Data.Common.QueryCache; using System.Data.Metadata.Edm; using System.Data.Objects; using System.Data.Objects.Internal; using System.Data.Query.InternalTrees; using System.Diagnostics; using System.Runtime.CompilerServices; namespace System.Data.Common.Internal.Materialization { ////// An immutable type used to generate Shaper instances. /// internal abstract class ShaperFactory { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static ShaperFactory Create(Type elementType, QueryCacheManager cacheManager, ColumnMap columnMap, MetadataWorkspace metadata, SpanIndex spanInfo, MergeOption mergeOption, bool valueLayer) { ShaperFactoryCreator creator = (ShaperFactoryCreator)Activator.CreateInstance(typeof(TypedShaperFactoryCreator<>).MakeGenericType(elementType)); return creator.TypedCreate(cacheManager, columnMap, metadata, spanInfo, mergeOption, valueLayer); } private abstract class ShaperFactoryCreator { internal abstract ShaperFactory TypedCreate(QueryCacheManager cacheManager, ColumnMap columnMap, MetadataWorkspace metadata, SpanIndex spanInfo, MergeOption mergeOption, bool valueLayer); } private sealed class TypedShaperFactoryCreator: ShaperFactoryCreator { public TypedShaperFactoryCreator() {} internal override ShaperFactory TypedCreate(QueryCacheManager cacheManager, ColumnMap columnMap, MetadataWorkspace metadata, SpanIndex spanInfo, MergeOption mergeOption, bool valueLayer) { return Translator.TranslateColumnMap (cacheManager, columnMap, metadata, spanInfo, mergeOption, valueLayer); } } } /// /// Typed ShaperFactory /// internal class ShaperFactory: ShaperFactory { private readonly int _stateCount; private readonly CoordinatorFactory _rootCoordinatorFactory; private readonly Action _checkPermissions; private readonly MergeOption _mergeOption; internal ShaperFactory(int stateCount, CoordinatorFactory rootCoordinatorFactory, Action checkPermissions, MergeOption mergeOption) { _stateCount = stateCount; _rootCoordinatorFactory = rootCoordinatorFactory; _checkPermissions = checkPermissions; _mergeOption = mergeOption; } /// /// Factory method to create the Shaper for Object Layer queries. /// internal ShaperCreate(DbDataReader reader, ObjectContext context, MetadataWorkspace workspace, MergeOption mergeOption, bool readerOwned) { Debug.Assert(mergeOption == _mergeOption, "executing a query with a different mergeOption than was used to compile the delegate"); return new Shaper (reader, context, workspace, mergeOption, _stateCount, _rootCoordinatorFactory, _checkPermissions, readerOwned); } } } // 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
- InheritanceAttribute.cs
- CodeDomComponentSerializationService.cs
- DataGridComboBoxColumn.cs
- ThreadInterruptedException.cs
- FontResourceCache.cs
- CopyOfAction.cs
- HashHelpers.cs
- sapiproxy.cs
- MsmqIntegrationInputMessage.cs
- WebWorkflowRole.cs
- BinaryParser.cs
- DmlSqlGenerator.cs
- MemberPath.cs
- Vector3DKeyFrameCollection.cs
- WebCodeGenerator.cs
- ClonableStack.cs
- DictionaryEntry.cs
- RawKeyboardInputReport.cs
- X500Name.cs
- XmlReaderDelegator.cs
- StatusBarItem.cs
- BindValidator.cs
- MembershipUser.cs
- TableProviderWrapper.cs
- GlobalAllocSafeHandle.cs
- EllipseGeometry.cs
- HtmlElementCollection.cs
- Byte.cs
- MarkupCompiler.cs
- TabItemAutomationPeer.cs
- X509ChainElement.cs
- ConfigurationCollectionAttribute.cs
- RawStylusSystemGestureInputReport.cs
- DataBindingsDialog.cs
- SafeEventLogWriteHandle.cs
- IDReferencePropertyAttribute.cs
- CodePrimitiveExpression.cs
- XmlSerializationReader.cs
- Drawing.cs
- ToolStripLocationCancelEventArgs.cs
- coordinator.cs
- Dynamic.cs
- DocobjHost.cs
- PackUriHelper.cs
- SHA384.cs
- SslStreamSecurityUpgradeProvider.cs
- ExternalException.cs
- AuthorizationRuleCollection.cs
- XmlSchemaProviderAttribute.cs
- Asn1IntegerConverter.cs
- RemoteCryptoRsaServiceProvider.cs
- ConsoleTraceListener.cs
- SecurityVerifiedMessage.cs
- WorkflowInstanceContextProvider.cs
- MobileCategoryAttribute.cs
- InstanceDataCollection.cs
- UpdateRecord.cs
- GradientPanel.cs
- Identity.cs
- Tile.cs
- HttpTransportManager.cs
- MemberHolder.cs
- EntityDataSourceValidationException.cs
- Size3D.cs
- WebPartHeaderCloseVerb.cs
- NodeFunctions.cs
- PersonalizationDictionary.cs
- TextTreeTextBlock.cs
- SQLDateTime.cs
- ResourceType.cs
- TreeViewAutomationPeer.cs
- OperationInvokerBehavior.cs
- SaveFileDialog.cs
- WindowsFormsSynchronizationContext.cs
- ComponentManagerBroker.cs
- RuleSetBrowserDialog.cs
- BamlMapTable.cs
- IChannel.cs
- SyndicationDeserializer.cs
- PartitionResolver.cs
- DictionaryEntry.cs
- ResourceType.cs
- XpsS0ValidatingLoader.cs
- BuildProvidersCompiler.cs
- Visual3D.cs
- SamlAuthenticationClaimResource.cs
- TextRangeEdit.cs
- BaseTemplateCodeDomTreeGenerator.cs
- TextElementCollectionHelper.cs
- RTTypeWrapper.cs
- ReflectionHelper.cs
- ControlBuilderAttribute.cs
- GroupBox.cs
- Wildcard.cs
- AsyncStreamReader.cs
- WebRequestModuleElementCollection.cs
- ClaimSet.cs
- AssociationProvider.cs
- TemplatePagerField.cs
- GridViewDeletedEventArgs.cs