Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <add key="APIKey.Website" value="MY-KEY" />
  2.  
  3. ApiConfig.ApiIoC = ioc;
  4. ApiConfig.ApplicationId = appId;
  5. ApiConfig.ApplicationKey = new ApplicationKey(WebConfigurationManager.AppSettings[appKeyConfigKey]);
  6.  
  7. public static class ApiConfig
  8. {
  9. private static ApplicationKey _applicationKey;
  10. public static ApplicationKey ApplicationKey
  11. {
  12. get
  13. {
  14. if (_applicationKey == null)
  15. {
  16. throw new NotSupportedException($"{nameof(ApiConfig)}.{nameof(ApplicationKey)} not configured.");
  17. }
  18. return _applicationKey;
  19. }
  20. set
  21. {
  22. _applicationKey = value;
  23. }
  24. }
  25. }
  26.  
  27. if (ApiConfig.ApplicationKey.Equals(key)) return null;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement