public Story(string name, IRuleset <IStory, IStoryHandler> handlerProvider) { try { Ensure.ArgumentNotEmpty(name, "name"); Ensure.ArgumentNotNull(handlerProvider, "handlerProvider"); this.HandlerProvider = handlerProvider; this.stopWatch = new Stopwatch(); this.log = new StoryLog(this); this.data = new StoryData(this); if (this.Parent == null) { this.Name = name; } else { this.Name = this.Parent.Name + "/" + name; } } catch { base.Detach(); throw; } }
public Story(string name, IRuleset <IStory, IStoryHandler> handlerProvider, bool notInContext = false) { Ensure.ArgumentNotEmpty(name, "name"); Ensure.ArgumentNotNull(handlerProvider, "handlerProvider"); this.HandlerProvider = handlerProvider; this.notInContext = notInContext; this.stopWatch = new Stopwatch(); this.log = new StoryLog(this); this.data = new StoryData(this); this.Name = name; }