Spaces:
Sleeping
Sleeping
Download project/Assets/Scripts/Net/DinoSessionCache.cs from alfarouqwebserver/SWS-Smarta: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/spaces/alfarouqwebserver/SWS-Smarta/resolve/main/project/Assets/Scripts/Net/DinoSessionCache.cs
- Command line
-
hf download hf://spaces/alfarouqwebserver/SWS-Smarta/project/Assets/Scripts/Net/DinoSessionCache.cs
-
curl -L -o DinoSessionCache.cs https://huggingface.co/spaces/alfarouqwebserver/SWS-Smarta/resolve/main/project/Assets/Scripts/Net/DinoSessionCache.cs
587 Bytes
| using System; | |
| using System.Collections.Generic; | |
| using Fusion; | |
| public static class DinoSessionCache | |
| { | |
| static readonly List<SessionInfo> sessions = new List<SessionInfo>(); | |
| public static IReadOnlyList<SessionInfo> Sessions => sessions; | |
| public static event Action<IReadOnlyList<SessionInfo>> OnUpdated; | |
| public static void SetSessions(IList<SessionInfo> list) | |
| { | |
| sessions.Clear(); | |
| if (list != null) | |
| { | |
| for (int i = 0; i < list.Count; i++) | |
| sessions.Add(list[i]); | |
| } | |
| OnUpdated?.Invoke(Sessions); | |
| } | |
| } | |