コード例 #1
0
        public SendFeedbackInteractor(
            IFeedbackApi feedbackApi,
            ISingletonDataSource <IThreadSafeUser> userDataSource,
            IDataSource <IThreadSafeWorkspace, IDatabaseWorkspace> workspacesDataSource,
            IDataSource <IThreadSafeTimeEntry, IDatabaseTimeEntry> timeEntriesDataSource,
            IPlatformInfo platformInfo,
            IUserPreferences userPreferences,
            ILastTimeUsageStorage lastTimeUsageStorage,
            ITimeService timeService,
            string message)
        {
            Ensure.Argument.IsNotNull(message, nameof(message));
            Ensure.Argument.IsNotNull(feedbackApi, nameof(feedbackApi));
            Ensure.Argument.IsNotNull(timeService, nameof(timeService));
            Ensure.Argument.IsNotNull(platformInfo, nameof(platformInfo));
            Ensure.Argument.IsNotNull(userDataSource, nameof(userDataSource));
            Ensure.Argument.IsNotNull(userPreferences, nameof(userPreferences));
            Ensure.Argument.IsNotNull(lastTimeUsageStorage, nameof(lastTimeUsageStorage));
            Ensure.Argument.IsNotNull(workspacesDataSource, nameof(workspacesDataSource));
            Ensure.Argument.IsNotNull(timeEntriesDataSource, nameof(timeEntriesDataSource));

            this.message               = message;
            this.feedbackApi           = feedbackApi;
            this.timeService           = timeService;
            this.platformInfo          = platformInfo;
            this.userDataSource        = userDataSource;
            this.userPreferences       = userPreferences;
            this.workspacesDataSource  = workspacesDataSource;
            this.timeEntriesDataSource = timeEntriesDataSource;
            this.lastTimeUsageStorage  = lastTimeUsageStorage;
        }
コード例 #2
0
            public TheSendMethod()
            {
                var endpoints   = new Endpoints(ApiEnvironment.Staging);
                var serializer  = new JsonSerializer();
                var credentials = Credentials.WithPassword("*****@*****.**".ToEmail(), "123456".ToPassword());

                apiClient   = Substitute.For <IApiClient>();
                feedbackApi = new FeedbackApiClient(endpoints, apiClient, serializer, credentials);
            }
コード例 #3
0
ファイル: FeedbackService.cs プロジェクト: RiBoysen/Bookify
 /// <summary>
 /// Initializes a new instance of the <see cref="FeedbackService"/> class.
 /// </summary>
 /// <param name="api">The API.</param>
 public FeedbackService(IFeedbackApi api)
 {
     this.api = api;
 }