ProfileV1 Constructor

Initializes a new instance of the ProfileV1 class.

Namespace: Gamanet.C4.SimpleInterfaces
Assembly: Gamanet.C4.SimpleInterfaces (in Gamanet.C4.SimpleInterfaces.dll) Version: 2026.0.0.242
Syntax
C#
public ProfileV1(
	Guid id,
	string name
)

Parameters

id  Guid
The identifier.
name  String
The name.
Example
The following example illustrates how to create Profile
C#
using Gamanet.C4.SimpleInterfaces;
using System;
using System.Collections.Generic;

public class CreateProfile()
{
    static void Main()
    {
      var profile = new Profile(Guid.NewGuid(), "Profile 1");
      profile.Description = "Example description";
      profile.ExternalNumber = "123456789";

      // add new instance of DeviceData
      profile.DeviceData.Add(new ProfileDeviceData(Guid.NewGuid())
      {
          DeviceIds = new List<Guid>()
          {
              Guid.Parse(EntityRoot.Device) // add Id of existing device
          },
          Data = new Dictionary<string, object>()
          {
              ["Enabled"] = true,
              ["TimeReset"] = TimeSpan.Parse("12:00:00")
          }
      });

      // add new instance of DeviceTypeData, use CategoryId of device as DeviceTypeId 
      profile.DeviceTypeData.Add(new ProfileDeviceTypeData(Guid.Parse("D81A3534-CA3F-4998-A8AC-473143DA521E")) // here ACS category is used 
      {
          Data = new Dictionary<string, object>()
          {
              ["MaxDevicesUnder"] = 25
          }
      });
    }
}
See Also

Reference

ProfileV1 Class
Gamanet.C4.SimpleInterfaces Namespace
ProfileDeviceTypeDataV1
ProfileDeviceDataV1
SimpleDeviceV1
EntityDefinitionV1