コード例 #1
0
ファイル: Program.cs プロジェクト: llenroc/Transcendence
 private static async void MessagingServiceOnDeliveryNotification(DeliveryNotification notification)
 {
     Out.WriteLine("   opponent received your message");
     await messagingService.MessageDeliveredStatusAcknowledge(
         new MessageDeliveredStatusAcknowledgeRequest { Messages = new List <Guid> {
                                                            notification.EventId
                                                        } });
 }
コード例 #2
0
    //public List<DeliveryNotification> deliveryNotifications = new List<DeliveryNotification>();
    public void CreateDeliveryNotification(DeliveryTruck truck)
    {
        Image newImage = Instantiate(deliveryPopupPrefab) as Image;

        newImage.transform.SetParent(popupsParent.transform, false);
        //deliveryNotifications.Add(newImage.GetComponent<DeliveryNotification>());
        DeliveryNotification notification = newImage.GetComponent <DeliveryNotification>();

        notification.truck = truck;
        notification.SetButtonCallbacks(truck);
    }
コード例 #3
0
        private async void OnMessageDelivered(DeliveryNotification notification)
        {
            var changed = await messageRepository.UpdateMessageStatusAsync(notification.MessageToken, MessageStatus.Delivered);

            await messagingService.MessageDeliveredStatusAcknowledge(new MessageDeliveredStatusAcknowledgeRequest { Messages = new List <Guid> {
                                                                                                                        notification.EventId
                                                                                                                    } });

            if (changed)
            {
                MessageStatusChanged(this, new MessageStatusEventArgs {
                    MessageToken = notification.MessageToken, Status = MessageStatus.Delivered
                });
            }
        }