Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BookingsApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public BookingsApi(ASW.APIServices.VMS.Client.Configuration configuration = null)
        {
            if (configuration == null) // use the default one in Configuration
            {
                this.Configuration = ASW.APIServices.VMS.Client.Configuration.Default;
            }
            else
            {
                this.Configuration = configuration;
            }

            ExceptionFactory = ASW.APIServices.VMS.Client.Configuration.DefaultExceptionFactory;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AgencyApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public AgencyApi(ASW.APIServices.VMS.Client.Configuration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            this.Configuration = ASW.APIServices.VMS.Client.Configuration.MergeConfigurations(
                ASW.APIServices.VMS.Client.GlobalConfiguration.Instance,
                configuration
                );
            this.Client             = new ASW.APIServices.VMS.Client.ApiClient(this.Configuration.BasePath);
            this.AsynchronousClient = new ASW.APIServices.VMS.Client.ApiClient(this.Configuration.BasePath);
            ExceptionFactory        = ASW.APIServices.VMS.Client.Configuration.DefaultExceptionFactory;
        }