コード例 #1
0
        public object RegisterDevice(string token, DeviceType type)
        {
            UsageData.SetIsMobileAppUser(SecurityContext.CurrentAccount.ID, type);

            using (var pushClient = new PushServiceClient())
            {
                string regid = pushClient.RegisterDevice(
                    CoreContext.TenantManager.GetCurrentTenant().TenantId,
                    SecurityContext.CurrentAccount.ID.ToString(),
                    token,
                    type);

                return(new { regid });
            }
        }
コード例 #2
0
ファイル: PushApi.cs プロジェクト: haoasqui/ONLYOFFICE-Server
        public object RegisterDevice(string token, DeviceType type)
        {
            UsageData.SetIsMobileAppUser(SecurityContext.CurrentAccount.ID, type);

            using (var pushClient = new PushServiceClient())
            {
                string regid = pushClient.RegisterDevice(
                    CoreContext.TenantManager.GetCurrentTenant().TenantId,
                    SecurityContext.CurrentAccount.ID.ToString(),
                    token,
                    type);

                return new {regid};
            }
        }