次の方法で共有


StreamingCollection<T> Class

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Framework.Server.StreamingCollection<T>

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Class StreamingCollection(Of T) _
    Implements IEnumerable(Of T), IEnumerable
public class StreamingCollection<T> : IEnumerable<T>, 
    IEnumerable
generic<typename T>
public ref class StreamingCollection : IEnumerable<T>, 
    IEnumerable
type StreamingCollection<'T> =  
    class 
        interface IEnumerable<'T>
        interface IEnumerable 
    end
JScript does not support generic types or methods.

Type Parameters

  • T

The StreamingCollection<T> type exposes the following members.

Constructors

  Name Description
Public method StreamingCollection<T>() Empty constructor required by ASP.NET in order to serialize. This constructor should not be used by a command because it will not have the needed reference to ContinueExecution.
Public method StreamingCollection<T>(Command) The StreamingCollection constructor that associates this collection to a command that is used to fill the collection with data. This will allow the collection to stream partial data and use the Commands ContinueExecution method data to retrieve that data as it needs it.
Public method StreamingCollection<T>(Command, Int32) The StreamingCollection constructor that associates this collection to a command that is used to fill the collection with data. This will allow the collection to stream partial data and use the Commands ContinueExecution method data to retrieve that data as it needs it.The estimated cache size of the object

Top

Properties

  Name Description
Public property Current
Public property HandleExceptions Indicates whether MoveNext() handles exceptions that may occur or rethrows them. By default, this is set to true because the iteration is generally being done by ASP.NET during the serialization process and we cannot just throw an exception to ASP.NET in the middle of this process. However, if a StreamingCollection is being used and iterated over explicitly, the caller would want to set this to false in order to handle any exceptions itself.
Protected property HasQueuedData Indicates whether there is currently data in the cache.
Public property IsComplete Once the command has filled this collection will all data for this result the command should set IsComplete to True. Do not set IsComplete when the cache is full, only set it after the collection has been fully populated.

Top

Methods

  Name Description
Public method Add This version of this method that is required by ASP.NET for XML Serialization. The Command should use the Enqueue(T) method which allows the collection to deal correctly with the cache.
Public method BindCommand binds this StreamingCollection to a command
Public method Enqueue Enqueue is used to add an item to the cache in a FIFO manner. This means that the first item added to the collection is the first item returned to the caller (First In First Out order). This is the method that should be used to handle cache management.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetEnumerator This collection enables access to the objects through both a generic and non-generic enumerator.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetQueuedItemsEnumerator Returns a non-destructive enumerator for the items in the queue.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method MoveNext
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.Framework.Server Namespace