/// <summary> /// Returns a collection of behaviors containing the identifier and tag data. /// </summary> public TileBehaviorCollection GetBehaviors(string identifier, object value) { TileBehaviorCollection c = new TileBehaviorCollection(); c.AddRange(this.Where(t => t.Datas.Any(tuple => tuple.Item1 == identifier && tuple.Item2 == value))); return(c); }
public static TileBehaviorCollection FromList(List <TileBehavior> l) { TileBehaviorCollection c = new TileBehaviorCollection(); c.AddRange(l); return(c); }
/// <summary> /// Returns a collection of behaviors container the tag. /// </summary> public TileBehaviorCollection GetBehaviors(string tag) { return(TileBehaviorCollection.FromList(this.Where(u => u.Tags.Contains(tag)).ToList())); }