コード例 #1
0
 public MessageUrlService(
     IMessageUrlRepository messageUrlRepository,
     IErrorService errorService,
     IBitlyService bitlyService)
 {
     _messageUrlRepository = messageUrlRepository;
     _errorService         = errorService;
     _bitlyService         = bitlyService;
 }
コード例 #2
0
        // Constructor
        public MainPage()
        {
            _repository = new IsolatedStorageRepository();
            _bitlyService = new BitlyService(BitlyApiSettings.DefaultSettings);

            InitializeComponent();

            // Set the data context of the listbox control to the sample data
            //DataContext = App.ViewModel;
            this.Loaded +=new RoutedEventHandler(MainPage_Loaded);
        }
コード例 #3
0
        public override void SetUp()
        {
            base.SetUp();

            _errorService = MockRepository.GenerateStub <IErrorService>();

            _bitlyService         = ServiceLocator.Current.GetInstance <IBitlyService>();
            _messageUrlRepository = ServiceLocator.Current.GetInstance <IMessageUrlRepository>();
            _unitOfWork           = ServiceLocator.Current.GetInstance <IUnitOfWork>();

            _messageUrlService = new MessageUrlService(_messageUrlRepository, _errorService, _bitlyService);
        }
コード例 #4
0
        public BitlyUrlShortener(string user, string key)
        {
            if (string.IsNullOrEmpty(user))
            {
                throw new ArgumentException("user");
            }

            if (string.IsNullOrEmpty(key))
            {
                throw new ArgumentException("key");
            }

            this.mUser = user;
            this.mKey  = key;

            this.mBitlyService = new BitlyService(this.mUser, this.mKey);
        }
コード例 #5
0
ファイル: UrlService.cs プロジェクト: Yandawl/DAX.Discord
 public UrlService(ILoggingService loggingService, IBitlyService bitlyService, IJobService jobService)
 {
     _loggingService = loggingService;
     _bitlyService = bitlyService;
     _jobService = jobService;
 }
コード例 #6
0
 public TwitterService(ITwitterProvider twitterProvider, IAuthService authService, IBitlyService bitlyService, ISecurityDataProvider securityDataProvider)
   : this(twitterProvider, authService, securityDataProvider)
 {
   _bitlyService = bitlyService ?? throw new ArgumentNullException(nameof(bitlyService));
 }
コード例 #7
0
ファイル: BitlyController.cs プロジェクト: realmarv/bitly
 public BitlyController(IBitlyService service)
 {
     _service = service;
 }