SQL Tools Service
Show / Hide Table of Contents
Improve this Doc View Source

Class LongList<T>

Collection class that permits storage of over int.MaxValue items. This is performed by using a 2D list of lists. The internal lists are only initialized as necessary. This collection implements IEnumerable to make it easier to run LINQ queries against it.

Inheritance
System.Object
LongList<T>
Namespace:Microsoft.SqlTools.ServiceLayer.Utility
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class LongList<T> : IEnumerable<T>, IEnumerable
Remarks

This class is based on code from $\Data Tools\SSMS_Main\sql\ssms\core\DataStorage\ArrayList64.cs with additions to bring it up to .NET 4.5 standards

Constructors

| Improve this Doc View Source

LongList()

Creates a new long list

Declaration
public LongList()

Properties

| Improve this Doc View Source

Count

The total number of elements in the array

Declaration
public long Count { get; }
Type Description
System.Int64
| Improve this Doc View Source

ExpandListSize

Declaration
public int ExpandListSize { get; }
Type Description
System.Int32
| Improve this Doc View Source

Item[Int64]

Declaration
public T this[long index] { get; }
Parameters
Type Name Description
System.Int64 index
Type Description
T

Methods

| Improve this Doc View Source

Add(T)

Adds the specified value to the end of the list

Declaration
public long Add(T val)
Parameters
Type Name Description
T val

Value to add to the list

Returns
Type Description
System.Int64

Index of the item that was just added

| Improve this Doc View Source

GetEnumerator()

Returns a generic enumerator for enumeration of this LongList

Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<T>

Enumerator for LongList

| Improve this Doc View Source

GetItem(Int64)

Returns the item at the specified index

Declaration
public T GetItem(long index)
Parameters
Type Name Description
System.Int64 index

Index of the item to return

Returns
Type Description
T

The item at the index specified

| Improve this Doc View Source

RemoveAt(Int64)

Removes an item at the specified location and shifts all the items after the provided index up by one.

Declaration
public void RemoveAt(long index)
Parameters
Type Name Description
System.Int64 index

The index to remove from the list

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Returns an enumerator for enumeration of this LongList

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator
  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX