コード例 #1
0
 /// <summary>
 /// Initialize a new instance of the <see cref="RequestHelper"/> class.
 /// </summary>
 public RequestHelper()
 {
     AddressRequestCreator   = new AddressRequestCreator();
     DirectoryRequestCreator = new DirectoryRequestCreator();
     ExpressWaybillRequest   = new ExpressWaybillRequestCreator();
     RequestCreator          = new RequestCreator();
 }
コード例 #2
0
ファイル: AddressApi.cs プロジェクト: kachechka/NovaPoshtaApi
        /// <summary>
        /// Initialize a new instance of the <see cref="AddressApi"/> class.
        /// </summary>
        /// <param name="client"><see cref="IApiHttpClient"/> for sending requests</param>
        /// <param name="config">Api configuration</param>
        /// <param name="creator">Request creator</param>
        internal AddressApi(
            IApiHttpClient client,
            IApiConfig config,
            AddressRequestCreator creator)
        {
            ThrowHelper.ThrowIfNull(client, nameof(client));
            ThrowHelper.ThrowIfNull(config, nameof(config));
            ThrowHelper.ThrowIfNull(creator, nameof(creator));

            _client  = client;
            _config  = config;
            _creator = creator;
        }