From 20d35a640570eab1a47e4bd8c156f1e8aeb7db2d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 1 Jun 2014 00:11:04 -0400 Subject: isolate .net specific methods in model project --- MediaBrowser.Model/Extensions/IntHelper.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 MediaBrowser.Model/Extensions/IntHelper.cs (limited to 'MediaBrowser.Model/Extensions/IntHelper.cs') diff --git a/MediaBrowser.Model/Extensions/IntHelper.cs b/MediaBrowser.Model/Extensions/IntHelper.cs new file mode 100644 index 000000000..4a96e19d4 --- /dev/null +++ b/MediaBrowser.Model/Extensions/IntHelper.cs @@ -0,0 +1,18 @@ +using System.Globalization; + +namespace MediaBrowser.Model.Extensions +{ + public static class IntHelper + { + /// + /// Tries the parse culture invariant. + /// + /// The s. + /// The result. + /// true if XXXX, false otherwise. + public static bool TryParseCultureInvariant(string s, out int result) + { + return int.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out result); + } + } +} -- cgit v1.2.3