Forráskód Böngészése

2004-12-15 Gonzalo Paniagua Javier <[email protected]>

	* Thread.cs: don't bother serializing if the CultureInfo we're setting
	has the same LCID as the CurrentCulture.


svn path=/trunk/mcs/; revision=37781
Gonzalo Paniagua Javier 21 éve
szülő
commit
b4d8bb72e5

+ 5 - 0
mcs/class/corlib/System.Threading/ChangeLog

@@ -1,3 +1,8 @@
+2004-12-15 Gonzalo Paniagua Javier <[email protected]>
+
+	* Thread.cs: don't bother serializing if the CultureInfo we're setting
+	has the same LCID as the CurrentCulture.
+
 2004-12-14  Zoltan Varga  <[email protected]>
 
 	* Thread.cs: Optimize CurrentCulture to avoid initializing the

+ 2 - 0
mcs/class/corlib/System.Threading/Thread.cs

@@ -398,6 +398,8 @@ namespace System.Threading
 				in_currentculture = true;
 
 				try {
+					if (CurrentCulture.LCID == value.LCID)
+						return;
 					BinaryFormatter bf = new BinaryFormatter();
 					MemoryStream ms = new MemoryStream ();
 					bf.Serialize (ms, value);