Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / QueryOperators / ListQueryResults.cs / 1305376 / ListQueryResults.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // ListQueryResults.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; namespace System.Linq.Parallel { ////// Class to represent an IList{T} as QueryResults{T} /// ///internal class ListQueryResults : QueryResults { private IList m_source; private int m_partitionCount; private bool m_useStriping; internal ListQueryResults(IList source, int partitionCount, bool useStriping) { m_source = source; m_partitionCount = partitionCount; m_useStriping = useStriping; } internal override void GivePartitionedStream(IPartitionedStreamRecipient recipient) { PartitionedStream partitionedStream = GetPartitionedStream(); recipient.Receive (partitionedStream); } internal override bool IsIndexible { get { return true; } } internal override int ElementsCount { get { return m_source.Count; } } internal override T GetElement(int index) { return m_source[index]; } internal PartitionedStream GetPartitionedStream() { return ExchangeUtilities.PartitionDataSource(m_source, m_partitionCount, m_useStriping); } } } // 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
- AssociationTypeEmitter.cs
- WebPartZone.cs
- TransformCollection.cs
- DropTarget.cs
- HtmlControl.cs
- DataControlCommands.cs
- RoleService.cs
- GestureRecognizer.cs
- SignatureDescription.cs
- PrimaryKeyTypeConverter.cs
- XmlSchemaAttributeGroup.cs
- OracleMonthSpan.cs
- DockPanel.cs
- CombinedGeometry.cs
- httpstaticobjectscollection.cs
- CqlGenerator.cs
- Int32CollectionValueSerializer.cs
- AssertFilter.cs
- Flowchart.cs
- SqlDependency.cs
- RegistrationServices.cs
- RepeatButtonAutomationPeer.cs
- ProcessHostConfigUtils.cs
- Bold.cs
- DbFunctionCommandTree.cs
- DbProviderSpecificTypePropertyAttribute.cs
- WindowsRegion.cs
- ListViewAutomationPeer.cs
- ScalarType.cs
- ItemAutomationPeer.cs
- SafeHandles.cs
- DataGridCellEditEndingEventArgs.cs
- DelayLoadType.cs
- EdmMember.cs
- XmlNamespaceManager.cs
- __TransparentProxy.cs
- TouchesCapturedWithinProperty.cs
- MultiPartWriter.cs
- SQLDecimalStorage.cs
- RegexTree.cs
- ConstantExpression.cs
- SortableBindingList.cs
- CultureSpecificStringDictionary.cs
- WindowsBrush.cs
- TripleDES.cs
- SymbolMethod.cs
- ArrayList.cs
- ControlCachePolicy.cs
- ChannelServices.cs
- DeploymentSectionCache.cs
- EmptyWorkItem.cs
- QueryCacheKey.cs
- FormatConvertedBitmap.cs
- XmlSchemaIdentityConstraint.cs
- ToolStripItemGlyph.cs
- MetadataArtifactLoaderComposite.cs
- ItemContainerProviderWrapper.cs
- CommandManager.cs
- PropertyTab.cs
- KeyPressEvent.cs
- BuildResult.cs
- HtmlElementErrorEventArgs.cs
- SQLByte.cs
- XmlKeywords.cs
- SortedList.cs
- ItemsControlAutomationPeer.cs
- CompilationLock.cs
- StorageFunctionMapping.cs
- ThicknessKeyFrameCollection.cs
- ReadContentAsBinaryHelper.cs
- EntityCodeGenerator.cs
- StoreContentChangedEventArgs.cs
- SqlLiftIndependentRowExpressions.cs
- ObjectMemberMapping.cs
- SafeLocalMemHandle.cs
- StreamGeometry.cs
- FocusManager.cs
- ExpressionWriter.cs
- SymbolEqualComparer.cs
- MbpInfo.cs
- SingleStorage.cs
- Operator.cs
- WebColorConverter.cs
- WebConfigurationManager.cs
- User.cs
- InputLanguageProfileNotifySink.cs
- ServiceInfo.cs
- StrokeIntersection.cs
- RepeatButtonAutomationPeer.cs
- QueryOperationResponseOfT.cs
- WizardPanelChangingEventArgs.cs
- Sql8ExpressionRewriter.cs
- BlockUIContainer.cs
- UrlMapping.cs
- SettingsBindableAttribute.cs
- WmlLinkAdapter.cs
- EncodingNLS.cs
- CultureTable.cs
- DesignerToolboxInfo.cs
- XmlBindingWorker.cs