Example #1
0
 private void Init(AmazonCredential Credentials)
 {
     this.Credentials      = Credentials;
     this._Feeds           = new Pipelines.FeedsPipeline(this.GetCredentials, this.Throttle);
     this._Finances        = new Pipelines.FinancesPipeline(this.GetCredentials, this.Throttle);
     this._Products        = new Pipelines.ProductsPipeline(this.GetCredentials, this.Throttle);
     this._Recommendations = new Pipelines.RecommendationsPipeline(this.GetCredentials, this.Throttle);
     this._Reports         = new Pipelines.ReportsPipeline(this.GetCredentials, this.Throttle);
     this._Orders          = new Pipelines.OrdersPipeline(this.GetCredentials, this.Throttle);
 }
Example #2
0
 public void Authenticate(AmazonCredential Credentials)
 {
     if (this.Credentials == default(AmazonCredential))
     {
         Init(Credentials);
     }
     else
     {
         throw new InvalidOperationException("Error, you are already authenticated to amazon in this AmazonConnection, dispose of this connection and create a new one to connect to a different account.");
     }
 }
Example #3
0
 public AmazonConnection(AmazonCredential Credentials) : this()
 {
     this.Authenticate(Credentials);
 }
Example #4
0
 internal protected TClient GetClient(AmazonCredential Credentials) => (TClient)Activator.CreateInstance(typeof(TClient), Credentials.AccessKeyID, Credentials.SecretAccessKey, this.GetConfig());