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
- UrlPath.cs
- PrivateFontCollection.cs
- AuthenticationService.cs
- XPathNodeHelper.cs
- ReaderWriterLock.cs
- RawStylusInput.cs
- ReliabilityContractAttribute.cs
- ValidatorCompatibilityHelper.cs
- SafeArrayTypeMismatchException.cs
- SchemaNotation.cs
- GridItemPattern.cs
- ScriptManager.cs
- SR.cs
- DataGridBoolColumn.cs
- rsa.cs
- PostBackOptions.cs
- TransactionManagerProxy.cs
- _CacheStreams.cs
- InternalRelationshipCollection.cs
- XmlSchemaObjectTable.cs
- UpdateCompiler.cs
- XappLauncher.cs
- DataGridViewCellStateChangedEventArgs.cs
- StrokeSerializer.cs
- MexHttpsBindingCollectionElement.cs
- SqlClientPermission.cs
- ScalarConstant.cs
- ResizeBehavior.cs
- ObservableCollection.cs
- RelationshipConstraintValidator.cs
- Wizard.cs
- SqlServices.cs
- RequestSecurityTokenForGetBrowserToken.cs
- Section.cs
- XmlSchemaSimpleTypeUnion.cs
- WebPartDisplayModeEventArgs.cs
- PropertyMapper.cs
- ResourceAttributes.cs
- SqlXmlStorage.cs
- RTTypeWrapper.cs
- XmlCDATASection.cs
- linebase.cs
- DefaultHttpHandler.cs
- GACMembershipCondition.cs
- PenThreadWorker.cs
- EntityDataSourceContainerNameItem.cs
- XmlSchemaComplexContent.cs
- Border.cs
- TickBar.cs
- XmlSchemaComplexType.cs
- IdentityVerifier.cs
- EntityDataSourceChangingEventArgs.cs
- XmlNamespaceDeclarationsAttribute.cs
- TlsnegoTokenAuthenticator.cs
- LayoutInformation.cs
- AuthenticationService.cs
- CodeTryCatchFinallyStatement.cs
- Splitter.cs
- MulticastIPAddressInformationCollection.cs
- Span.cs
- ResourceIDHelper.cs
- SQLInt64.cs
- PropertyMapper.cs
- SimpleApplicationHost.cs
- HtmlProps.cs
- RemotingConfigParser.cs
- ResourceReferenceKeyNotFoundException.cs
- ACE.cs
- StringReader.cs
- SocketElement.cs
- XPathBinder.cs
- QueryInterceptorAttribute.cs
- RadioButtonList.cs
- ChineseLunisolarCalendar.cs
- EntityContainerAssociationSet.cs
- ToolStripEditorManager.cs
- BulletedListEventArgs.cs
- Soap.cs
- RepeaterItem.cs
- BamlTreeUpdater.cs
- DataGridViewSelectedCellCollection.cs
- XmlChildNodes.cs
- MimeReturn.cs
- WebPartsPersonalization.cs
- UInt32.cs
- ScrollProperties.cs
- DataTemplate.cs
- XmlSchemaSubstitutionGroup.cs
- COM2PropertyPageUITypeConverter.cs
- DiscoveryCallbackBehavior.cs
- ThreadInterruptedException.cs
- TrackingMemoryStreamFactory.cs
- DataServiceEntityAttribute.cs
- DataServiceSaveChangesEventArgs.cs
- ManagedIStream.cs
- BlurEffect.cs
- HtmlLink.cs
- BypassElement.cs
- EventLogConfiguration.cs
- DbMetaDataCollectionNames.cs