Struct Leap::Unity::ReadonlyList

struct Leap.Unity.ReadonlyList<T>

A simple wrapper around List to provide readonly access. Useful when you want to return a list to someone but you want to make sure they don’t muck it up!


List<T> asList { get; set; }

Converts the ReadonlyList{T} reference back to a List{T}. Useful to use extension methods that accept Lists but not ReadonlyLists, but be careful, this makes the underlying data writeable again and could go against the grain of another author’s API. Intended to allow calling Query() ops on APIs that expose ReadonlyLists instead of Lists.