From df58769478625d71103838041f401601ecbcff41 Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Wed, 15 Apr 2026 22:27:08 +0200 Subject: [PATCH] Added missing LazyFetchEventArgs container --- Source/Collections/LazyFetchEventArgs.cs | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Source/Collections/LazyFetchEventArgs.cs diff --git a/Source/Collections/LazyFetchEventArgs.cs b/Source/Collections/LazyFetchEventArgs.cs new file mode 100644 index 0000000..db1dda9 --- /dev/null +++ b/Source/Collections/LazyFetchEventArgs.cs @@ -0,0 +1,54 @@ +#region Apache License 2.0 +/* +Nuclex Foundation libraries for .NET +Copyright (C) 2002-2025 Markus Ewald / Nuclex Development Labs + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +#endregion // Apache License 2.0 + +using System; + +namespace Nuclex.Avalonia.Collections { + + /// + /// Argument container to report when items have been fetch by a lazy-loading collection + /// + public class LazyFetchEventArgs { + + /// Initializes a new lazy-fetched item argument container + /// Index of the first item that has been fetched + /// Number of items that have been fetched + public LazyFetchEventArgs(int startIndex, int count) { + this.startIndex = startIndex; + this.count = count; + } + + /// Index of the first item that has been fetched + public int StartIndex { + get { return this.startIndex; } + } + + /// Number of items that have been fetched + public int Count { + get { return this.count; } + } + + /// Index of the first item that has been fetched + private int startIndex; + /// Number of items that have been fetched + private int count; + + } + +} // namespace Nuclex.Avalonia.Collections \ No newline at end of file