In this example, the server name field is visible but no default value is
assigned; the server port is set to 5001 but the field is hidden:
public override ServerSettings DefaultServerSettings
{
get
{
if (m_ServerSettings == null)
{
m_ServerSettings = new ServerSettings();
// Server name will be shown and initialized as empty.
m_ServerSettings.ServerName.IsVisible = true;
m_ServerSettings.ServerName.HasValue = false;
// Server port will NOT be shown and initialized as 5001.
m_ServerSettings.ServerPort.IsVisible = false;
m_ServerSettings.ServerPort.HasValue = true;
m_ServerSettings.ServerPort.Value = 5001;
// Other fields will be shown.
}
return m_ServerSettings;
}
}
private ServerSettings m_ServerSettings;