private void Initialize() { var provisioningConfigurationSet = ConfigurationSets.OfType <T>().SingleOrDefault(); if (provisioningConfigurationSet == null) { Provisioning = new T(); ConfigurationSets.Add(Provisioning); } else { Provisioning = provisioningConfigurationSet; } }
private void Initialize() { var networkConfigurationSet = ConfigurationSets.OfType <NetworkConfigurationSet>().SingleOrDefault(); if (networkConfigurationSet == null) { NetworkConfigurationSet = new NetworkConfigurationSet(); ConfigurationSets.Add(NetworkConfigurationSet); } else { NetworkConfigurationSet = networkConfigurationSet; } if (NetworkConfigurationSet.InputEndpoints == null) { NetworkConfigurationSet.InputEndpoints = new Collection <InputEndpoint>(); } }