public MessageUrlService( IMessageUrlRepository messageUrlRepository, IErrorService errorService, IBitlyService bitlyService) { _messageUrlRepository = messageUrlRepository; _errorService = errorService; _bitlyService = bitlyService; }
// 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); }
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); }
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); }
public UrlService(ILoggingService loggingService, IBitlyService bitlyService, IJobService jobService) { _loggingService = loggingService; _bitlyService = bitlyService; _jobService = jobService; }
public TwitterService(ITwitterProvider twitterProvider, IAuthService authService, IBitlyService bitlyService, ISecurityDataProvider securityDataProvider) : this(twitterProvider, authService, securityDataProvider) { _bitlyService = bitlyService ?? throw new ArgumentNullException(nameof(bitlyService)); }
public BitlyController(IBitlyService service) { _service = service; }