// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Collections.Generic; namespace Microsoft.MixedReality.OpenXR { /// /// Event arguments for the event. /// Following design pattern set by /// public struct ARMarkersChangedEventArgs { /// /// The list of s added since the last event. /// public IReadOnlyList added { get; } /// /// The list of s udpated since the last event. /// public IReadOnlyList updated { get; } /// /// The list of s removed since the last event. /// public IReadOnlyList removed { get; } /// /// Default empty list of s. /// private static IReadOnlyList empty { get; } = new ARMarker[0]; /// /// Constructs an . /// /// The list of s added since the last event. /// The list of s updated since the last event. /// The list of s removed since the last event. internal ARMarkersChangedEventArgs( IReadOnlyList added, IReadOnlyList updated, IReadOnlyList removed) { this.added = (added != null) ? added : empty; this.updated = (updated != null) ? updated : empty; this.removed = (removed != null) ? removed : empty; } /// /// Generates a string representation of this . /// /// A string representation of this . public override string ToString() { return string.Format("Added: {0}, Updated: {1}, Removed: {2}", added.Count, updated.Count, removed.Count); } } }