Ejemplo n.º 1
0
        internal static ChatMessageReadReceiptsCollection DeserializeChatMessageReadReceiptsCollection(JsonElement element)
        {
            IReadOnlyList <ChatMessageReadReceiptInternal> value = default;
            Optional <string> nextLink = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <ChatMessageReadReceiptInternal> array = new List <ChatMessageReadReceiptInternal>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(ChatMessageReadReceiptInternal.DeserializeChatMessageReadReceiptInternal(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new ChatMessageReadReceiptsCollection(value, nextLink.Value));
        }
Ejemplo n.º 2
0
 internal ChatMessageReadReceipt(ChatMessageReadReceiptInternal chatMessageReadReceiptInternal)
 {
     Sender        = CommunicationIdentifierSerializer.Deserialize(chatMessageReadReceiptInternal.SenderCommunicationIdentifier);
     ChatMessageId = chatMessageReadReceiptInternal.ChatMessageId;
     ReadOn        = chatMessageReadReceiptInternal.ReadOn;
 }