Esempio n. 1
0
 public Experiment(string name, ISciencePublisher publisher, IExperimentState state,
                   IExperimentSteps <T, TPublish> steps, bool throwOnInternalExceptions)
 {
     _name      = name;
     _publisher = publisher; //if this is null, nothing gets published! should we throw?
     _throwOnInternalExceptions = throwOnInternalExceptions;
     _currentState = state;
     _steps        = steps; //should be overwriten by public Set
 }
Esempio n. 2
0
 //ctor for testing
 public Laboratory(ISciencePublisher publisher, bool throwOnInternalExceptions)
 {
     if (publisher == null)
     {
         throw new ArgumentNullException("publisher");
     }
     this.publisher = publisher;
     this.throwOnInternalExceptions = throwOnInternalExceptions;
 }
Esempio n. 3
0
        //public Laboratory(IScienceExperiment<T, TPublish> experiment, IExperimentSteps<T, TPublish> steps)
        //{
        //    if (experiment == null) throw new ArgumentNullException("experiment");
        //    if (steps == null) throw new ArgumentNullException("steps");
        //    this.experiment = experiment;
        //    this.steps = steps;
        //}
        //public Laboratory(IScienceExperiment<T, TPublish> experiment)
        //    : this(experiment, new ExperimentSteps<T,TPublish>())
        //{ }

        //public Laboratory(string name) : this(name, new ConsolePublisher())
        //{ }

        public Laboratory(ISciencePublisher publisher)
            : this(publisher, false)
        {
        }
Esempio n. 4
0
 public static void SetPublisher(ISciencePublisher publisher)
 {
     _publisher = publisher;
 }
Esempio n. 5
0
 public SimpleExperiment(string name, ISciencePublisher publisher)
     : base(name, publisher, false)
 {
 }
Esempio n. 6
0
 public SimpleExperiment(string name, ISciencePublisher publisher, bool raiseInternalExceptions)
     : base(name, publisher, raiseInternalExceptions)
 {
 }
Esempio n. 7
0
 public Experiment(string name, ISciencePublisher publisher)
     : this(name, publisher, false)
 {
 }
Esempio n. 8
0
 public Experiment(string name, ISciencePublisher publisher, bool throwOnInternalExceptions)
     : this(name, publisher, new ExperimentState(), throwOnInternalExceptions)
 {
 }
Esempio n. 9
0
 public Experiment(string name, ISciencePublisher publisher, IExperimentState state,
                   bool throwOnInternalExceptions)
     : this(name, publisher, state, new ExperimentSteps <T, TPublish>(), throwOnInternalExceptions)
 {
 }