コード例 #1
0
        public FcmServiceConnection(FcmConfiguration configuration)
        {
            Configuration = configuration;
            http          = new HttpClient();

            http.DefaultRequestHeaders.UserAgent.Clear();
            http.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("PushSharp", "3.0"));
            http.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", "key=" + Configuration.SenderAuthToken);
            http.DefaultRequestHeaders.TryAddWithoutValidation("Sender", "id=" + Configuration.SenderID);
        }
コード例 #2
0
 public FcmServiceBroker(FcmConfiguration configuration) : base(new FcmServiceConnectionFactory(configuration))
 {
 }
コード例 #3
0
 public FcmServiceConnectionFactory(FcmConfiguration configuration)
 {
     Configuration = configuration;
 }