Represents a set of configuration settings
Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiClient" /> class
        /// with default base path (https://docraptor.com/).
        /// </summary>
        /// <param name="config">An instance of Configuration.</param>
        public ApiClient(Configuration config = null)
        {
            if (config == null)
                Configuration = Configuration.Default;
            else
                Configuration = config;

            RestClient = new RestClient("https://docraptor.com/");
            RestClient.UserAgent = "csharp-swagger-" + Configuration.Version;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DocApi"/> class
 /// using Configuration object
 /// </summary>
 /// <param name="configuration">An instance of Configuration</param>
 /// <returns></returns>
 public DocApi(Configuration configuration = null)
 {
     if (configuration == null) // use the default one in Configuration
         this.Configuration = Configuration.Default;
     else
         this.Configuration = configuration;
 }