Exemple #1
0
 public static void SaveChangesToFile(IJSONService _jsonService, IXMLService _xmlService, string pathname, List <Book> _bookRepository)
 {
     if (Path.GetExtension(pathname) == ".xml")
     {
         _xmlService.SaveChangesToXmlFile(_bookRepository);
     }
     else if (Path.GetExtension(pathname) == ".json")
     {
         _jsonService.SaveChangesToJsonFile(_bookRepository);
     }
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Monzo.Framework.Services.BaseService"/> class.
        /// </summary>
        /// <param name="configuration">Library configurations</param>
        protected BaseService(MonzoConfiguration configuration)
        {
            this.httpService   = configuration.httpService ?? throw new ArgumentNullException(nameof(httpService));
            this.logger        = configuration.logger ?? throw new ArgumentNullException(nameof(logger));
            this.jsonService   = configuration.jsonService ?? throw new ArgumentNullException(nameof(jsonService));
            this.authetication = configuration.GetAuth();

            if (string.IsNullOrWhiteSpace(authetication.AccessToken))
            {
                throw new ArgumentNullException(nameof(authetication.AccessToken));
            }
        }
Exemple #3
0
 public APIDataBroker(IAPIService apiService, IJSONService jsonService)
 {
     _apiService  = apiService;
     _jsonService = jsonService;
 }
Exemple #4
0
 public ProjectReference(IUnitOfWork db, IJSONService jsonService)
 {
     _db          = db;
     _jsonService = jsonService;
 }
Exemple #5
0
 public BookRepository(IJSONService jsonService, IXMLService xmlService)
 {
     _xmlService  = xmlService;
     _jsonService = jsonService;
     LoadBookRepository();
 }
 public AuthenticationService(IJSONService jSONService, ILoggerProvider loggerProvider, INexusAPIClientFactory clientFactory)
 {
     _jSONService   = jSONService;
     _clientFactory = clientFactory;
     _log           = loggerProvider.GetAppLogger();
 }
 /// <summary>
 /// Class Constructor
 /// </summary>
 /// <param name="view">Instance of the Permit Info View Interface</param>
 public JSONServicePresenter(IJSONService view)
 {
     this._view = view;
 }
 /* Constructors */
 public GamesProvider(IAppDatabaseProvider appDatabaseProvider, IJSONService jsonService)
 {
     _appDatabaseProvider = appDatabaseProvider;
     _jsonService         = jsonService;
     Initialize();
 }