/// <summary> /// Constructs a new service settings base object by cloning the settings from an existing one. /// </summary> /// <param name="existing">The existing settings object to clone settings from. Must not be null.</param> protected ServiceSettingsBase(ServiceSettingsBase existing) { GaxPreconditions.CheckNotNull(existing, nameof(existing)); CallSettings = existing.CallSettings; Clock = existing.Clock; Scheduler = existing.Scheduler; VersionHeader = existing.VersionHeader; }
/// <summary> /// Constructs a helper from the given settings. /// Behavior is undefined if settings are changed after construction. /// </summary> /// <param name="settings">The service settings.</param> public ClientHelper(ServiceSettingsBase settings) { GaxPreconditions.CheckNotNull(settings, nameof(settings)); Clock = settings.Clock ?? SystemClock.Instance; Scheduler = settings.Scheduler ?? SystemScheduler.Instance; _clientCallSettings = settings.CallSettings; _versionCallSettings = CallSettings.FromHeader(VersionHeaderBuilder.HeaderName, settings.VersionHeader); }
/// <summary> /// Constructs a new service settings base object by cloning the settings from an existing one. /// </summary> /// <param name="existing">The existing settings object to clone settings from. Must not be null.</param> protected ServiceSettingsBase(ServiceSettingsBase existing) { GaxPreconditions.CheckNotNull(existing, nameof(existing)); CallSettings = existing.CallSettings; Clock = existing.Clock; Scheduler = existing.Scheduler; UserAgent = existing.UserAgent; }