This file is used for getting the shared settings information from the appSettings.json file These properties will subsequently at multiple places
Example #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="spoAuthorization"></param>
 /// <param name="generalSettings"></param>
 /// <param name="searchSettings"></param>
 public Search(ISPOAuthorization spoAuthorization,
     IConfigurationRoot configuration,
     ICustomLogger customLogger,
     IUsersDetails userDetails,
     ISPList spList,
     IOptions<GeneralSettings> generalSettings,
     IOptions<SharedSettings> sharedSettings,
     IOptions<LogTables> logTables,
     IOptions<SearchSettings> searchSettings,
     IOptions<CamlQueries> camlQueries,
     IOptions<ListNames> listNames,
     IOptions<ErrorSettings> errorSettings)
 {
     this.spoAuthorization = spoAuthorization;
     this.generalSettings = generalSettings.Value;
     this.searchSettings = searchSettings.Value;
     this.userDetails = userDetails;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.spList = spList;
     this.camlQueries = camlQueries.Value;
     this.listNames = listNames.Value;
     this.sharedSettings = sharedSettings.Value;
     this.errorSettings = errorSettings.Value;
     this.configuration = configuration;
 }
 /// <summary>
 /// Constructor where all dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="sharedSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="sharedRepository"></param>
  public SharedController(IOptions<ErrorSettings> errorSettings,
      IOptions<SharedSettings> sharedSettings,            
      IMatterCenterServiceFunctions matterCenterServiceFunctions,            
      ICustomLogger customLogger, IOptions<LogTables> logTables,
      ISharedRepository sharedRepository
      )
  {
      this.errorSettings = errorSettings.Value;            
      
      this.matterCenterServiceFunctions = matterCenterServiceFunctions;
      this.sharedRepository = sharedRepository;
      this.customLogger = customLogger;
      this.logTables = logTables.Value;
      this.sharedSettings = sharedSettings.Value;
  }