CalendarV1 Constructor

Initializes a new instance of the CalendarV1 class.

Namespace: Gamanet.C4.SimpleInterfaces
Assembly: Gamanet.C4.SimpleInterfaces (in Gamanet.C4.SimpleInterfaces.dll) Version: 2026.0.0.242
Syntax
C#
public CalendarV1(
	Guid id
)

Parameters

id  Guid
The identifier.
Example
The following example illustrates how to create Calendar
C#
using Gamanet.C4.SimpleInterfaces;
using System;

public class CreateCalendar
{
    static void Main()
    {
      var day = Guid.Parse("d0768bf6-7420-4163-bcbc-b7fb02829b9a");
      var start = DateTime.Parse("02/18/2020 07:22:16").TimeOfDay;
      var end = DateTime.Parse("02/22/2020 09:25:21").TimeOfDay;

      // create new instance of TimeFrame
      var timeFrame = new TimeFrame(Guid.NewGuid(), day, start, end);

      // create new instance of calendar
      var calendar = new Calendar(Guid.NewGuid());
      calendar.Name = "Calendar"; // calendar's name
      calendar.From = DateTime.Parse("02/18/2020 07:22:16"); // from
      calendar.To = DateTime.Parse("02/22/2020 09:25:21"); // to
      calendar.TimeFrames.Add(timeFrame); // add timeFrame to calendar
    }
}
See Also

Reference

CalendarV1 Class
Gamanet.C4.SimpleInterfaces Namespace
TimeFrameV1