123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using HTEXLib.COMM.Helpers;
- using TEAMModelOS.SDK.Extension;
- using TEAMModelOS.SDK.Models;
- using TEAMModelOS.SDK.Models.Cosmos.OpenEntity;
- namespace TEAMModelOS.TEST
- {
- public class Program
- {
- static void Main(string[] args)
- {
- string s = @"{
- ""events"":[
- {""Time"":0.0003,""EventId"":589825,""Event"":""ActStart"",""ActStartTime"":""0""},
- {""Time"":0.6862,""Pgid"":""230919091004e7c2a32f7a5feb169508580427428204301"",""EventId"":524289,""Event"":""EzsStartRecord"",""VdoFileName"":""video_e7c2a32f7a5feb169508582860049958634"",""DeviceTypeName"":""HiEncoder""},
- {""Time"":125.0722,""Pgid"":""230919091230e7c2a32f7a5feb169508595074975887597"",""EventId"":917530,""Event"":""FastPgPush"",""PushPgNo"":2},
- {""Time"":125.8639,""Pgid"":""230919091230e7c2a32f7a5feb169508595074975887597"",""EventId"":786435,""Event"":""PopQuesLoad"",""PopOpitonCount"":9},
- {""Time"":199.7944,""Pgid"":""230919091345e7c2a32f7a5feb169508602551991831623"",""EventId"":917530,""Event"":""FastPgPush"",""PushPgNo"":3},
- {""Time"":202.9378,""Pgid"":""230919091345e7c2a32f7a5feb169508602551991831623"",""EventId"":786435,""Event"":""PopQuesLoad"",""PopOpitonCount"":9},
- {""Time"":243.0507,""Pgid"":""230919091345e7c2a32f7a5feb169508602551991831623"",""EventId"":458762,""Event"":""PickupResult"",""PickupTypeId"":655368,""PickupType"":""PickupOption"",""PickupMemberId"":""[\r\n 17\r\n]"",""PickupCount"":1,""PickupOption"":3},
- {""Time"":353.2466,""Pgid"":""230919091618e7c2a32f7a5feb169508617880160233546"",""EventId"":917530,""Event"":""FastPgPush"",""PushPgNo"":4},
- {""Time"":365.1775,""Pgid"":""230919091618e7c2a32f7a5feb169508617880160233546"",""EventId"":786435,""Event"":""PopQuesLoad"",""PopOpitonCount"":9},
- {""Time"":436.9988,""Pgid"":""230919091618e7c2a32f7a5feb169508617880160233546"",""EventId"":458762,""Event"":""PickupResult"",""PickupTypeId"":655368,""PickupType"":""PickupOption"",""PickupMemberId"":""[\r\n 31\r\n]"",""PickupCount"":1,""PickupOption"":3},
- {""Time"":1846.4325,""EventId"":589826,""Event"":""ActEnd"",""ActPeriod"":1846}
- ],
- ""PgIdList"":[""230919091004e7c2a32f7a5feb169508580427428204301"",""230919091230e7c2a32f7a5feb169508595074975887597"",""230919091345e7c2a32f7a5feb169508602551991831623"",""230919091618e7c2a32f7a5feb169508617880160233546"",""230919092216e7c2a32f7a5feb169508653678181046471"",""230919092644e7c2a32f7a5feb169508680433102606359"",""230919092932e7c2a32f7a5feb169508697228939345777"",""230919093259e7c2a32f7a5feb169508717901847926536"",""230919093524e7c2a32f7a5feb169508732428838481413""]
- }";
- TimeLineData timeLineData = s.ToObject<TimeLineData>();
- List<TimeLineEvent> timeLineEvents = timeLineData.events.FindAll(z => !string.IsNullOrWhiteSpace(z.Event) && z.Event.Equals("PickupResult"));
- if (timeLineEvents.IsNotEmpty())
- {
- foreach (var timeLineEvent in timeLineEvents)
- {
- var memberIds = timeLineEvent.PickupMemberId.ToObject<List<int>>();
- }
- }
- List<string> groupNames = new List<string>() { "組別4", "組別2", "組別3", "組別4", "組別1", "組別1" };
- groupNames =groupNames.OrderBy(x => x).ToList();
- }
- }
- }
|