1 using System.Collections.Generic;
11 if(collection.Count != 1) {
15 return System.Linq.Enumerable.First(collection);
22 if(collection.Count != 1) {
26 return System.Linq.Enumerable.First(collection);
33 "Expected exactly one entity in collection but found " + count +
"!",
34 "Use collection.SingleEntity() only when you are sure that there " +
35 "is exactly one entity.") {
static IEntity SingleEntity(this ICollection< IEntity > collection)
static TEntity SingleEntity< TEntity >(this ICollection< TEntity > collection)
Base exception used by Entitas.