public CompositeRootConfiguration CreateNewRootConfiguration(string endpoint, Type compositeRootType, Type compositeRootAuthenticatorType, CompositeRootMode mode, TimeSpan sessionExpiration) { if (mode == CompositeRootMode.None) { throw new ArgumentException(string.Format(Resources.CompositeRootModeParameterCannotBeNone, nameof(mode), mode.ToString()), nameof(mode), null); } var newRootConfiguration = new RootConfiguration(ServerConfiguration.rootHttpServerConfiguration) { Endpoint = endpoint, CompositeRootType = compositeRootType, CompositeRootAuthenticatorType = compositeRootAuthenticatorType, Mode = mode, SessionExpiration = sessionExpiration }; var compositeRootConfiguration = new CompositeRootConfiguration(newRootConfiguration, this) { Endpoint = endpoint, CompositeRootType = compositeRootType, CompositeRootAuthenticatorType = compositeRootAuthenticatorType, Mode = mode, SessionExpiration = sessionExpiration }; rootConfigurations.Add(compositeRootConfiguration.Id, compositeRootConfiguration); return(compositeRootConfiguration); }
internal CompositeRootConfiguration(RootConfiguration rootConfiguration, CompositeRootConfigurationContainer compositeRootConfigurationContainer) { _rootConfiguration = rootConfiguration; ActiveRootConfigurations = compositeRootConfigurationContainer; CompositeRootAuthenticatorType = _rootConfiguration.CompositeRootAuthenticatorType; }