コード例 #1
0
        public FirebaseSessionController(IHttpClient httpClient,
                                         IApplicationHost appHost,
                                         IJsonSerializer json,
                                         SessionInfo session,
                                         string token, ISessionManager sessionManager)
        {
            _httpClient     = httpClient;
            _json           = json;
            _appHost        = appHost;
            Session         = session;
            _token          = token;
            _sessionManager = sessionManager;

            _applicationId = _appHost.GetValue("firebase_applicationid");
            _senderId      = _appHost.GetValue("firebase_senderid");
        }
コード例 #2
0
        public static string GetOmdbUrl(string query, IApplicationHost appHost, CancellationToken cancellationToken)
        {
            var baseUrl = appHost.GetValue("omdb_baseurl");

            if (string.IsNullOrEmpty(baseUrl))
            {
                baseUrl = "https://www.omdbapi.com";
            }

            var url = baseUrl + "?apikey=fe53f97e";

            if (!string.IsNullOrWhiteSpace(query))
            {
                url += "&" + query;
            }

            return(url);
        }
コード例 #3
0
 public static bool IsSupported(IApplicationHost appHost)
 {
     return(!string.IsNullOrEmpty(appHost.GetValue("firebase_applicationid")) && !string.IsNullOrEmpty(appHost.GetValue("firebase_senderid")));
 }