| | | 1 | | // ----------------------------------------------------------------------- |
| | | 2 | | // <copyright file="StaticBehaviorExtensions.cs" company="Stéphane ANDRE"> |
| | | 3 | | // Copyright (c) Stéphane ANDRE. All rights reserved. |
| | | 4 | | // </copyright> |
| | | 5 | | // ----------------------------------------------------------------------- |
| | | 6 | | |
| | | 7 | | using MyNet.Globalization.Facade; |
| | | 8 | | using MyNet.Observable.Behaviors; |
| | | 9 | | |
| | | 10 | | #pragma warning disable IDE0130 // Namespace does not match folder structure |
| | | 11 | | namespace MyNet.Observable.Facade; |
| | | 12 | | #pragma warning restore IDE0130 // Namespace does not match folder structure |
| | | 13 | | |
| | | 14 | | public 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 | | { |
| | 0 | 24 | | obj.ReactOnCultureChanged(GlobalizationServices.Current); |
| | | 25 | | |
| | 0 | 26 | | 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 | | { |
| | 0 | 35 | | obj.ReactOnTimeZoneChanged(GlobalizationServices.Current); |
| | | 36 | | |
| | 0 | 37 | | return obj; |
| | | 38 | | } |
| | | 39 | | } |
| | | 40 | | } |
| | | 41 | | |