Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / QueryOperators / Options / OrderingQueryOperator.cs / 1305376 / OrderingQueryOperator.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // OrderingQueryOperator.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; using System.Threading; namespace System.Linq.Parallel { ////// Represents operators AsOrdered and AsUnordered. In the current implementation, it /// simply turns on preservation globally in the query. /// ///internal sealed class OrderingQueryOperator : QueryOperator { // Turns on order (AsOrdered) or turns off order (AsUnordered) private bool m_orderOn; private QueryOperator m_child; private OrdinalIndexState m_ordinalIndexState; public OrderingQueryOperator(QueryOperator child, bool orderOn) : base(orderOn, child.SpecifiedQuerySettings) { m_child = child; m_ordinalIndexState = m_child.OrdinalIndexState; m_orderOn = orderOn; } internal override QueryResults Open(QuerySettings settings, bool preferStriping) { return m_child.Open(settings, preferStriping); } internal override IEnumerator GetEnumerator(ParallelMergeOptions? mergeOptions, bool suppressOrderPreservation) { ScanQueryOperator childAsScan = m_child as ScanQueryOperator ; if (childAsScan != null) { return childAsScan.Data.GetEnumerator(); } return base.GetEnumerator(mergeOptions, suppressOrderPreservation); } //---------------------------------------------------------------------------------------- // Returns an enumerable that represents the query executing sequentially. // internal override IEnumerable AsSequentialQuery(CancellationToken token) { return m_child.AsSequentialQuery(token); } //--------------------------------------------------------------------------------------- // Whether this operator performs a premature merge. // internal override bool LimitsParallelism { get { return m_child.LimitsParallelism; } } internal override OrdinalIndexState OrdinalIndexState { get { return m_ordinalIndexState; } } } } // 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
- SmtpAuthenticationManager.cs
- AccessibleObject.cs
- ModifierKeysValueSerializer.cs
- ChangeConflicts.cs
- CredentialCache.cs
- ModifierKeysValueSerializer.cs
- HintTextMaxWidthConverter.cs
- StyleReferenceConverter.cs
- WorkflowTransactionOptions.cs
- Empty.cs
- RtfToXamlLexer.cs
- TypeReference.cs
- CookieProtection.cs
- XmlSchemaObjectTable.cs
- XmlLanguage.cs
- _Semaphore.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TextSimpleMarkerProperties.cs
- ParameterCollection.cs
- ReachDocumentPageSerializer.cs
- PeerNameRecordCollection.cs
- CompositeTypefaceMetrics.cs
- AssemblyAssociatedContentFileAttribute.cs
- SrgsElementFactory.cs
- BindingOperations.cs
- XmlDocument.cs
- ListViewTableCell.cs
- WorkflowElementDialog.cs
- ResourceContainer.cs
- ComMethodElement.cs
- PresentationAppDomainManager.cs
- SystemResourceKey.cs
- HotSpot.cs
- ScrollEventArgs.cs
- HierarchicalDataTemplate.cs
- MD5.cs
- FilteredXmlReader.cs
- WebPartPersonalization.cs
- TransformerTypeCollection.cs
- XmlSerializationGeneratedCode.cs
- WeakEventTable.cs
- PointF.cs
- CodePrimitiveExpression.cs
- ColorConverter.cs
- UIElement.cs
- TimeZone.cs
- DateTimeUtil.cs
- DPCustomTypeDescriptor.cs
- NativeMethods.cs
- TagPrefixAttribute.cs
- LongValidator.cs
- LogEntrySerializer.cs
- WindowsScrollBarBits.cs
- ActionFrame.cs
- TaskHelper.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- Rethrow.cs
- _AuthenticationState.cs
- StorageEntityContainerMapping.cs
- DataGridClipboardHelper.cs
- ListViewDeletedEventArgs.cs
- TreeNode.cs
- TextTreeText.cs
- UdpChannelListener.cs
- X509ServiceCertificateAuthenticationElement.cs
- NetworkInformationPermission.cs
- SqlFactory.cs
- OracleEncoding.cs
- COM2PropertyPageUITypeConverter.cs
- FontStyle.cs
- CodeParameterDeclarationExpressionCollection.cs
- MenuItemCollectionEditorDialog.cs
- ColorMatrix.cs
- WebPartRestoreVerb.cs
- CommandField.cs
- TypeReference.cs
- DataSpaceManager.cs
- SettingsPropertyWrongTypeException.cs
- SQLDateTime.cs
- _HTTPDateParse.cs
- IRCollection.cs
- XmlAggregates.cs
- Pair.cs
- ExecutedRoutedEventArgs.cs
- XmlEntityReference.cs
- OpCellTreeNode.cs
- MimeMapping.cs
- LinqDataSourceUpdateEventArgs.cs
- ArcSegment.cs
- BaseParaClient.cs
- TypedReference.cs
- ConfigurationStrings.cs
- DecimalAnimationBase.cs
- IndicCharClassifier.cs
- HtmlControl.cs
- FontDifferentiator.cs
- AbstractExpressions.cs
- DragDeltaEventArgs.cs
- InheritablePropertyChangeInfo.cs
- UmAlQuraCalendar.cs