示例#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);
     }
 }
示例#2
0
        /// <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));
            }
        }
示例#3
0
 public APIDataBroker(IAPIService apiService, IJSONService jsonService)
 {
     _apiService  = apiService;
     _jsonService = jsonService;
 }
示例#4
0
 public ProjectReference(IUnitOfWork db, IJSONService jsonService)
 {
     _db          = db;
     _jsonService = jsonService;
 }
示例#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;
 }
示例#8
0
 /* Constructors */
 public GamesProvider(IAppDatabaseProvider appDatabaseProvider, IJSONService jsonService)
 {
     _appDatabaseProvider = appDatabaseProvider;
     _jsonService         = jsonService;
     Initialize();
 }