public object PickOne(params WeightedOption[] weightedOptions) { var castedOptions = weightedOptions.Select(wo => WeightedOption <object> ._(wo.Weight, wo.Obj)); var result = PickOne <object>(castedOptions.ToArray()); return(result); }
public static WeightedOption <T> _(double weight, T obj) { var result = new WeightedOption <T>() { Weight = weight, Obj = obj }; return(result); }