microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore.DevTools/Events/MetaDataEvent.cs
35lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System.Text.Json.Serialization; |
| 5 | |
| 6 | using Microsoft.Teams.Plugins.AspNetCore.DevTools.Models; |
| 7 | |
| 8 | namespace Microsoft.Teams.Plugins.AspNetCore.DevTools.Events; |
| 9 | |
| 10 | public class MetaDataEvent : IEvent |
| 11 | { |
| 12 | [JsonPropertyName("id")] |
| 13 | [JsonPropertyOrder(0)] |
| 14 | public Guid Id { get; } |
| 15 | |
| 16 | [JsonPropertyName("type")] |
| 17 | [JsonPropertyOrder(1)] |
| 18 | public string Type { get; } |
| 19 | |
| 20 | [JsonPropertyName("body")] |
| 21 | [JsonPropertyOrder(2)] |
| 22 | public object? Body { get; } |
| 23 | |
| 24 | [JsonPropertyName("sentAt")] |
| 25 | [JsonPropertyOrder(3)] |
| 26 | public DateTime SentAt { get; } |
| 27 | |
| 28 | public MetaDataEvent(MetaData body) |
| 29 | { |
| 30 | Id = Guid.NewGuid(); |
| 31 | Type = "metadata"; |
| 32 | Body = body; |
| 33 | SentAt = DateTime.Now; |
| 34 | } |
| 35 | } |