Show / Hide Table of Contents

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>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Microsoft.SqlTools.ServiceLayer.Utility
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class LongList<T> : IEnumerable<T>, IEnumerable
Type Parameters
Name Description
T Type of the values to store
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; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

ExpandListSize

Declaration
public int ExpandListSize { get; }
Property Value
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
Property Value
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

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()
| 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
Implements
System.Collections.IEnumerable.GetEnumerator()
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX