< Summary

Information
Class: MyNet.Observable.ExtendedCollectionExtensions
Assembly: MyNet.Observable
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Observable/Collections/Extensions/ExtendedCollectionExtensions.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 31
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToObservableChangeSet(...)100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Observable/Collections/Extensions/ExtendedCollectionExtensions.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ExtendedCollectionExtensions.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8using DynamicData;
 9using DynamicData.Binding;
 10using MyNet.Observable.Collections;
 11
 12#pragma warning disable IDE0130 // Namespace does not match folder structure
 13namespace MyNet.Observable;
 14#pragma warning restore IDE0130 // Namespace does not match folder structure
 15
 16/// <summary>
 17/// Provides extension methods for the ExtendedCollection class, allowing it to be converted into an observable change s
 18/// </summary>
 19public static class ExtendedCollectionExtensions
 20{
 21    /// <summary>
 22    /// Converts an ExtendedCollection of type T into an observable change set that emits updates whenever the collectio
 23    /// </summary>
 24    /// <param name="source">The ExtendedCollection to convert.</param>
 25    /// <typeparam name="T">The type of items in the collection.</typeparam>
 26    /// <returns>An observable change set that emits updates whenever the collection changes.</returns>
 27    public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this ExtendedCollection<T> source)
 28        where T : notnull
 3329        => source.ToObservableChangeSet<ExtendedCollection<T>, T>();
 30}
 31