mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2026-02-04 02:36:55 +00:00
Update projects
This commit is contained in:
68
src/Tribufu/Client/GlobalConfiguration.cs
Normal file
68
src/Tribufu/Client/GlobalConfiguration.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tribufu.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="GlobalConfiguration"/> provides a compile-time extension point for globally configuring
|
||||
/// API Clients.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A customized implementation via partial class may reside in another file and may
|
||||
/// be excluded from automatic generation via a .openapi-generator-ignore file.
|
||||
/// </remarks>
|
||||
public partial class GlobalConfiguration : Configuration
|
||||
{
|
||||
#region Private Members
|
||||
|
||||
private static readonly object GlobalConfigSync = new { };
|
||||
private static IReadableConfiguration _globalConfiguration;
|
||||
|
||||
#endregion Private Members
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <inheritdoc />
|
||||
private GlobalConfiguration()
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public GlobalConfiguration(IDictionary<string, string> defaultHeader, IDictionary<string, string> apiKey, IDictionary<string, string> apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath)
|
||||
{
|
||||
}
|
||||
|
||||
static GlobalConfiguration()
|
||||
{
|
||||
Instance = new GlobalConfiguration();
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default Configuration.
|
||||
/// </summary>
|
||||
/// <value>Configuration.</value>
|
||||
public static IReadableConfiguration Instance
|
||||
{
|
||||
get { return _globalConfiguration; }
|
||||
set
|
||||
{
|
||||
lock (GlobalConfigSync)
|
||||
{
|
||||
_globalConfiguration = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user