Ejemplo n.º 1
0
        protected internal Experiment(string name, string description, Func <string> identify = null, Func <Experiment, bool> conclude = null, Func <Experiment, IOrderedEnumerable <KeyValuePair <int, double> > > score = null, Func <string, int, int> splitOn = null, object[] alternatives = null, params string[] metrics)
        {
            Name        = name;
            Description = description;
            CreatedAt   = DateTime.UtcNow;
            Type        = new ABTest();

            _alternatives = alternatives ?? new object[] { false, true };
            _metrics      = new HashSet <string>(metrics);

            Identify = identify ?? ab.Identify.Default.Value;
            Conclude = conclude ?? Conclusion.Default.Value;
            Score    = score ?? Scoring.Default.Value;
            SplitOn  = splitOn ?? Audience.Default.Value;

            _participants = new ConcurrentDictionary <string, Participant>();
        }
Ejemplo n.º 2
0
        protected internal Experiment(string name, string description, Func<string> identify = null, Func<Experiment, bool> conclude = null, Func<Experiment, IOrderedEnumerable<KeyValuePair<int, double>>> score = null, Func<string, int, int> splitOn = null, object[] alternatives = null, params string[] metrics)
        {
            Name = name;
            Description = description;
            CreatedAt = DateTime.UtcNow;
            Type = new ABTest();
            
            _alternatives = alternatives ?? new object[] { false, true };
            _metrics = new HashSet<string>(metrics);
            
            Identify = identify ?? ab.Identify.Default.Value;
            Conclude = conclude ?? Conclusion.Default.Value;
            Score = score ?? Scoring.Default.Value;
            SplitOn = splitOn ?? Audience.Default.Value;

            _participants = new ConcurrentDictionary<string, Participant>();
        }