protected BsActorModel(IBsActorCollection actors, Func <IBsActor, T> factory) { _actors = actors; _factory = factory; for (int i = 0; i < actors.Count(); i++) { Add(actors.Actor(i)); } _actors.OnAdd += OnAddHandler; }
public BsModel(IBsActorCollection actors) { if (actors == null) { throw new ArgumentNullException("actors"); } if (actors.Count() < 2) { throw new ArgumentException("At least 2 actors expected but was " + _actors.Count()); } _actors = actors; }