Class ContainerExtensions
Helper class that provides extensions for the IContainedThing and IThingContainer implementations.
Inheritance
System.Object
ContainerExtensions
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: Fibula.Mechanics.Contracts.Extensions
Assembly: Fibula.Mechanics.Contracts.dll
Syntax
public static class ContainerExtensions
Methods
| Improve this Doc View SourceGetParentContainerHierarchy(IContainedThing, Boolean)
Gets this thing's parent container hierarchy.
Declaration
public static IEnumerable<IThingContainer> GetParentContainerHierarchy(this IContainedThing containedThing, bool includeTiles = true)
Parameters
Type | Name | Description |
---|---|---|
IContainedThing | containedThing | The contained thing to get the hierarchy for. |
System.Boolean | includeTiles | Optional. A value indicating whether to include tiles in the hierarchy. Defaults to true. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IThingContainer> | The ordered collection of IThingContainers in this thing's container hierarchy. |
GetParentContainerHierarchy(IThingContainer, Boolean)
Gets this thing's parent container hierarchy.
Declaration
public static IEnumerable<IThingContainer> GetParentContainerHierarchy(this IThingContainer thingContainer, bool includeTiles = true)
Parameters
Type | Name | Description |
---|---|---|
IThingContainer | thingContainer | The thing container to get the hierarchy for. |
System.Boolean | includeTiles | Optional. A value indicating whether to include tiles in the hierarchy. Defaults to true. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IThingContainer> | The ordered collection of IThingContainers in this thing's container hierarchy. |