Show / Hide Table of Contents

Class Container

Provides a base class for objects that can self-locate thier position inside spaces (Space<C> objects).

Inheritance
System.Object
Container
Container<T>
Namespace: MultidimLib
Syntax
public abstract class Container

Methods

Locate(Space)

Returns a collection of points (Point objects) whereat the current container is located, if so, in the provided source space; otherwise it returns null. If the source space is null, this method returns null as well.

Declaration
public ICollection<Point> Locate(Space source)
Parameters
Type Name Description
Space source

The source space wherein to locate the current container.

Locate(Space[])

Calls the Locate(IEnumerable<Space>) method.

Declaration
public LocationDictionary Locate(params Space[] sources)
Parameters
Type Name Description
Space[] sources

The spaces to be passed onto the Locate(IEnumerable<Space>) method.

Locate(IEnumerable<Space>)

Returns a location dictionary (LocationDictionary object) that indicates whereat the current container is located, if so, in the provided source spaces. If the source spaces are all null or no source space is provided at all, then the current container's location is retrieved from every space that stores it. If the current container is not stored in any space, this method returns an empty location dictionary and in no case will it ever return null.

Declaration
public LocationDictionary Locate(IEnumerable<Space> sources)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Space> sources

The source spaces wherein to locate the current container.

LocateAsync(Space)

Returns a task that asynchronously calls the Locate(Space) method.

Declaration
public Task<ICollection<Point>> LocateAsync(Space source)
Parameters
Type Name Description
Space source

The space to be passed onto the Locate(Space) method.

LocateAsync(Space[])

Returns a task that asynchronously calls the Locate(Space[]) method.

Declaration
public Task<LocationDictionary> LocateAsync(params Space[] sources)
Parameters
Type Name Description
Space[] sources

The spaces to be passed onto the Locate(Space[]) method.

LocateAsync(IEnumerable<Space>)

Returns a task that asynchronously calls the Locate(IEnumerable<Space>) method.

Declaration
public Task<LocationDictionary> LocateAsync(IEnumerable<Space> sources)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Space> sources

The spaces to be passed onto the Locate(IEnumerable<Space>) method.

Unlink(Space[])

Calls the Unlink(IEnumerable<Space>) method.

Declaration
public void Unlink(params Space[] sources)
Parameters
Type Name Description
Space[] sources

The spaces to be passed onto the Unlink(IEnumerable<Space>) method.

Unlink(IEnumerable<Space>)

Removes the current container from the provided source spaces. If the source spaces are all null or no source space is provided at all, then the current container is removed from every space that stores it.

Declaration
public void Unlink(IEnumerable<Space> sources)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Space> sources

The source spaces wherefrom to remove the current container.

UnlinkAsync(Space[])

Returns a task that asynchronously calls the Unlink(Space[]) method.

Declaration
public Task UnlinkAsync(params Space[] sources)
Parameters
Type Name Description
Space[] sources

The spaces to be passed onto the Unlink(Space[]) method.

UnlinkAsync(IEnumerable<Space>)

Returns a task that asynchronously calls the Unlink(IEnumerable<Space>) method.

Declaration
public Task UnlinkAsync(IEnumerable<Space> sources)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Space> sources

The spaces to be passed onto the Unlink(IEnumerable<Space>) method.

Extension Methods

Initialization.C<T>(T)
Back to top MultidimLib from Ecuador.