Table of Contents

Interface IHasProperties

Namespace
DotTiled
Assembly
DotTiled.dll

Interface for objects that have properties attached to them.

public interface IHasProperties

Methods

GetProperties()

The properties attached to the object.

IList<IProperty> GetProperties()

Returns

IList<IProperty>

GetProperty<T>(string)

Gets a property of the specified type with the specified name.

T GetProperty<T>(string name) where T : IProperty

Parameters

name string

The name of the property to get.

Returns

T

The property with the specified name.

Type Parameters

T

The type of the property to get.

MapPropertiesTo<T>()

Maps all properties in this object to a new instance of the specified type using reflection.

T MapPropertiesTo<T>() where T : new()

Returns

T

Type Parameters

T

MapPropertiesTo<T>(Func<T>)

Maps all properties in this object to a new instance of the specified type using reflection.

T MapPropertiesTo<T>(Func<T> initializer)

Parameters

initializer Func<T>

Returns

T

Type Parameters

T

TryGetProperty<T>(string, out T)

Tries to get a property of the specified type with the specified name.

bool TryGetProperty<T>(string name, out T property) where T : IProperty

Parameters

name string

The name of the property to get.

property T

The property with the specified name, if found.

Returns

bool

True if a property with the specified name was found; otherwise, false.

Type Parameters

T

The type of the property to get.