< Summary

Information
Class: MyNet.Observable.Facade.StaticBehaviorExtensions
Assembly: MyNet.Observable
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Observable/Behaviors/Extensions/Facade/StaticBehaviorExtensions.cs
Tag: 323_28699572109
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 41
Line coverage: 0%
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
ReactOnCultureChanged(...)100%210%
ReactOnTimeZoneChanged(...)100%210%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Observable/Behaviors/Extensions/Facade/StaticBehaviorExtensions.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="StaticBehaviorExtensions.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using MyNet.Globalization.Facade;
 8using MyNet.Observable.Behaviors;
 9
 10#pragma warning disable IDE0130 // Namespace does not match folder structure
 11namespace MyNet.Observable.Facade;
 12#pragma warning restore IDE0130 // Namespace does not match folder structure
 13
 14public static class StaticBehaviorExtensions
 15{
 16    extension(ObservableObject obj)
 17    {
 18        /// <summary>
 19        /// Adds localization behavior to the specified observable object using the current globalization services. This
 20        /// </summary>
 21        /// <returns>The observable object with localization behavior added.</returns>
 22        public ObservableObject ReactOnCultureChanged()
 23        {
 024            obj.ReactOnCultureChanged(GlobalizationServices.Current);
 25
 026            return obj;
 27        }
 28
 29        /// <summary>
 30        /// Adds time zone localization behavior to the specified observable object using the current globalization serv
 31        /// </summary>
 32        /// <returns>The observable object with time zone localization behavior added.</returns>
 33        public ObservableObject ReactOnTimeZoneChanged()
 34        {
 035            obj.ReactOnTimeZoneChanged(GlobalizationServices.Current);
 36
 037            return obj;
 38        }
 39    }
 40}
 41