Common settings for all services.
コード例 #1
0
 /// <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;
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 /// <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;
 }