private TimeSlotOptions StartEvery2Hours_Duration246Windows(LocalTime start, LocalTime end) { var options = new TimeSlotOptions(); options.StartTimeAndDurations = new Dictionary <LocalTime, List <double> >(); var fromHere = new LocalTime(start.Hour, start.Minute, start.Second); var fromHereHour = fromHere.Hour; var durations = new List <double> { 2d, 4d, 6d }; while (fromHereHour < end.Hour) { if (fromHere.Hour + 6 > end.Hour) { durations.Remove(6); } if (fromHere.Hour + 4 > end.Hour) { durations.Remove(4); } if (fromHere.Hour + 2 > end.Hour) { durations.Remove(2); } options.StartTimeAndDurations.Add(fromHere, new List <double>(durations)); fromHere = fromHere.PlusHours(2); fromHereHour += 2; } return(options); }
protected FieldValueVariantRequestBase(int projectId, string label, string description, int projectFieldId, string masterDescription, string programmaticValue, int price, bool playerSelectable, TimeSlotOptions timeSlotOptions) { ProjectId = projectId; Label = label; Description = description; ProjectFieldId = projectFieldId; MasterDescription = masterDescription; ProgrammaticValue = programmaticValue; Price = price; PlayerSelectable = playerSelectable; TimeSlotOptions = timeSlotOptions; }
public UpdateFieldValueVariantRequest(int projectId, int projectFieldDropdownValueId, string label, string description, int projectFieldId, string masterDescription, string programmaticValue, int price, bool playerSelectable, TimeSlotOptions timeSlotOptions) : base(projectId, label, description, projectFieldId, masterDescription, programmaticValue, price, playerSelectable, timeSlotOptions) { ProjectFieldDropdownValueId = projectFieldDropdownValueId; }