• Guides
  • Api Documentation
Show / Hide Table of Contents
  • Discord.Addons.MpGame
    • CurrentlyPlaying
    • GameBase<TPlayer>
    • IMpGameData
    • MpGameModuleBase<TService, TGame, TPlayer>
    • MpGameService<TGame, TPlayer>
    • MpGameService<TGame, TPlayer>.MpGameData
    • Player
  • Discord.Addons.MpGame.Collections
    • CircularLinkedList<T>
    • Hand<T>
    • IWrapper<T>
    • Node<T>
    • Pile<T>
    • WrappingPile<T, TWrapper>
  • Discord.Addons.Preconditions
    • Measure
    • MinimumOnlineUsersAttribute
    • RatelimitAttribute
    • RatelimitFlags
    • RequireLowerHierarchyAttribute
    • RequireRoleAttribute
    • UserMustBeInVoiceAttribute

Class WrappingPile<T, TWrapper>

Base type to represent a pile of objects inside a custom wrapper type.


Inheritance
Object
Pile<T>
WrappingPile<T, TWrapper>
Inherited Members
Pile<T>.CanBrowse
Pile<T>.CanClear
Pile<T>.CanCut
Pile<T>.CanDraw
Pile<T>.CanDrawBottom
Pile<T>.CanInsert
Pile<T>.CanPeek
Pile<T>.CanPut
Pile<T>.CanPutBottom
Pile<T>.CanShuffle
Pile<T>.CanTake
Pile<T>.Count
Pile<T>.AsEnumerable()
Pile<T>.Browse()
Pile<T>.BrowseAndTakeAsync(Func<IReadOnlyDictionary<Int32, T>, Task<Int32[]>>, Func<T, Boolean>, Boolean)
Pile<T>.Clear()
Pile<T>.Cut(Int32)
Pile<T>.Cut(Index)
Pile<T>.Draw()
Pile<T>.DrawBottom()
Pile<T>.DrawMultiple(Int32)
Pile<T>.InsertAt(T, Int32)
Pile<T>.InsertAt(T, Index)
Pile<T>.Mill(Pile<T>)
Pile<T>.PeekAt(Int32)
Pile<T>.PeekAt(Index)
Pile<T>.PeekTop(Int32)
Pile<T>.Put(T)
Pile<T>.PutBottom(T)
Pile<T>.Shuffle()
Pile<T>.TakeAt(Int32)
Pile<T>.TakeAt(Index)
Pile<T>.ShuffleItems(IEnumerable<T>)
Pile<T>.OnLastRemoved()
Pile<T>.OnPut(T)
Namespace: Discord.Addons.MpGame.Collections
Assembly: Discord.Addons.MpGame.dll
Syntax
public abstract class WrappingPile<T, TWrapper> : Pile<T>
    where T        : class
    where TWrapper : struct, IWrapper<T>
Type Parameters
Name Description
T

The item type.

TWrapper

The wrapper type.

Remarks
warning

This type is for advanced scenarios that require intercepting the insertion/removal of items (for example: a single pile that has mixed visibility of its contents).
Consider inheriting from Pile<T> directly for the common use-cases.

Constructors

| Improve this Doc View Source

WrappingPile()

Declaration
protected WrappingPile()
| Improve this Doc View Source

WrappingPile(IEnumerable<T>)

Declaration
protected WrappingPile(IEnumerable<T> items)
Parameters
Type Name Description
IEnumerable<T> items
| Improve this Doc View Source

WrappingPile(IEnumerable<T>, Boolean)

Declaration
protected WrappingPile(IEnumerable<T> items, bool initShuffle)
Parameters
Type Name Description
IEnumerable<T> items
Boolean initShuffle

Methods

| Improve this Doc View Source

GetWrapperRefAt(Int32)

Gets a langword_csharp_ref to a wrapper object at the specified index.

Declaration
protected ref TWrapper GetWrapperRefAt(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
TWrapper
Exceptions
Type Condition
ArgumentOutOfRangeException

index was less than 0 or greater than or equal to the pile's current size.

| Improve this Doc View Source

Wrap(T)

Puts an instance of type T into a TWrapper.

Declaration
protected abstract TWrapper Wrap(T item)
Parameters
Type Name Description
T item
Returns
Type Description
TWrapper
  • Improve this Doc
  • View Source
Back to top Generated by DocFX