Even if I go the other way and read roles I do not get time profiles. What do you observe if you try this?
var Server = new ManagementServer(Configuration.Instance.ServerFQID);
foreach (var role in Server.RoleFolder.Roles)
{
label1.Text += role.DisplayName + role.RoleDefaultTimeProfile + Environment.NewLine;
}
It works for me if i use the Configuration API direct, I tested this with the Config API Client sample.
Your observations now fits mine. I will ask Milestone Development to analyze why we cannot read those values from the VideoOS.Platform.ConfigurationItems.Role object.
The TimeProfile properties has been omitted from the all Roles result for performance reasons. If you request a specific role they will be populated, so in your code above this will include it:
Role pr2 = new Role(EnvironmentManager.Instance.MasterSite.ServerId, pr.Path);
We will make sure to update the documentation regarding this.