[corlib] Parse datetime string using culture calendar. Fixes #18052
[mono.git] / mcs / class / corlib / System.Runtime.Versioning / VersioningHelper.cs
index ef6398eb303d035873eb663a53329898322d7819..1f7dda0cefa415a510af9a7e5b91d0a6ea648fd0 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 namespace System.Runtime.Versioning {
 
        public static class VersioningHelper {
 
+               static private int GetDomainId ()
+               {
+#if NET_2_1
+                       return 0;
+#else
+                       return AppDomain.CurrentDomain.Id;
+#endif
+               }
+
                static private int GetProcessId ()
                {
                        // TODO - System.Diagnostics.Process class is located in System.dll
@@ -42,11 +49,11 @@ namespace System.Runtime.Versioning {
                {
                        if (process && appdomain) {
                                return String.Concat (name, "_", GetProcessId ().ToString (),
-                                       "_", AppDomain.CurrentDomain.Id.ToString ());
+                                       "_", GetDomainId ().ToString ());
                        } else if (process) {
                                return String.Concat (name, "_", GetProcessId ().ToString ());
                        } else if (appdomain) {
-                               return String.Concat (name, "_", AppDomain.CurrentDomain.Id.ToString ());
+                               return String.Concat (name, "_", GetDomainId ().ToString ());
                        }
                        // nothing, return original string
                        return name;
@@ -116,5 +123,3 @@ namespace System.Runtime.Versioning {
                }
        }
 }
-
-#endif