From ed98531950f0ad2431ea972550d27b8688953232 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 30 Nov 2022 18:17:40 +0000 Subject: [PATCH] Use statement body for CurrentWorld property --- VpSharp/src/VirtualParadiseClient.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/VpSharp/src/VirtualParadiseClient.cs b/VpSharp/src/VirtualParadiseClient.cs index 2707f94..a226123 100644 --- a/VpSharp/src/VirtualParadiseClient.cs +++ b/VpSharp/src/VirtualParadiseClient.cs @@ -79,7 +79,19 @@ public sealed partial class VirtualParadiseClient : IDisposable /// The world to which this client is currently connected, or if this client is not currently /// in a world. /// - public VirtualParadiseWorld? CurrentWorld => CurrentAvatar?.Location.World; + public VirtualParadiseWorld? CurrentWorld + { + get => CurrentAvatar?.Location.World; + } + + /// + /// Gets a read-only view of the cached worlds. + /// + /// The cached worlds. + public IReadOnlyList Worlds + { + get => _worlds.Values.ToArray(); + } /// /// Establishes a connection to the universe at the specified remote endpoint.