Merge pull request #2942 from jogibear9988/patch-2
authorMarek Safar <marek.safar@gmail.com>
Sun, 24 Apr 2016 07:49:59 +0000 (09:49 +0200)
committerMarek Safar <marek.safar@gmail.com>
Sun, 24 Apr 2016 07:49:59 +0000 (09:49 +0200)
bugfix numInfo of Cultureinfo NonSerialized on Windows

45 files changed:
acceptance-tests/SUBMODULES.json
acceptance-tests/roslyn.mk
external/referencesource
mcs/class/MicrosoftAjaxLibrary/License.htm
mcs/class/System.Core/Makefile
mcs/class/System.Core/monotouch_System.Core.dll.sources
mcs/class/System.Core/monotouch_tv_System.Core.dll.sources
mcs/class/System.Core/monotouch_watch_System.Core.dll.sources
mcs/class/System.Core/xammac_System.Core.dll.sources
mcs/class/WindowsBase/System.Windows.Media/Matrix.cs
mcs/class/WindowsBase/System.Windows/Int32Rect.cs
mcs/class/WindowsBase/System.Windows/Point.cs
mcs/class/WindowsBase/System.Windows/Rect.cs
mcs/class/WindowsBase/System.Windows/Size.cs
mcs/class/WindowsBase/System.Windows/Vector.cs
mcs/class/corlib/Makefile
mcs/class/corlib/ReferenceSources/RuntimeType.cs
mcs/class/corlib/ReferenceSources/win32native.cs
mcs/class/corlib/System.IO/Directory.cs
mcs/class/corlib/System.IO/DirectoryInfo.cs
mcs/class/corlib/System.IO/File.cs
mcs/class/corlib/System.IO/FileInfo.cs [deleted file]
mcs/class/corlib/System.IO/FileSystemInfo.cs [deleted file]
mcs/class/corlib/System.IO/MonoIOError.cs
mcs/class/corlib/System.IO/MonoIOStat.cs
mcs/class/corlib/System.IO/Path.cs
mcs/class/corlib/System.Reflection/MonoField.cs
mcs/class/corlib/System.Reflection/MonoMethod.cs
mcs/class/corlib/Test/System.IO/FileInfoTest.cs
mcs/class/corlib/corlib.dll.sources
mcs/class/corlib/monotouch_tv_runtime_corlib.dll.sources
mcs/class/corlib/monotouch_watch_runtime_corlib.dll.sources
mcs/class/dlr/License.html
mcs/class/dlr/License.rtf
mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
mono/metadata/gc.c
mono/metadata/icall.c
mono/metadata/object.c
mono/metadata/threadpool-ms-io.c
mono/metadata/threadpool-ms.c
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/metadata/threads.h
mono/mini/driver.c
mono/mini/tramp-amd64-gsharedvt.c

index 7a9de16bc374515f3f926267bfcfc27645a232cd..2e83f9ea795adc63dd194c6b713d067287d871d4 100644 (file)
@@ -10,7 +10,7 @@
   {
     "name": "coreclr", 
     "url": "git://github.com/mono/coreclr.git", 
-    "rev": "3d9a68d3baaa32df28b70a2266a9ef9ee2176b79", 
+    "rev": "b05c242a59eab1c4ea2803960c8065167308546d", 
     "remote-branch": "origin/mono", 
     "branch": "mono", 
     "directory": "coreclr"
index 17e0e4ce67580a5f3a762dbd89ca5d8bb8ab667f..fbfa2760ec2744588adbfb251e67a2a4adf3ae23 100644 (file)
@@ -10,7 +10,7 @@ check-roslyn:
                mkdir -p $$MONO_DOTNET_PORTABLE_DIR; \
                mkdir -p $$MONO_NUGET_TARGETS_DIR; \
                mkdir -p $$MONO_PORTABLE_TARGETS_DIR; \
-               curl -SL "http://storage.bos.internalx.com/bot-provisioning/RoslynBuildDependencies.zip" > /tmp/RoslynBuildDependencies.zip; \
+               curl -SL "http://download.mono-project.com/third-party/RoslynBuildDependencies.zip" > /tmp/RoslynBuildDependencies.zip; \
                unzip -o /tmp/RoslynBuildDependencies.zip -d /tmp/RoslynBuildDependencies; \
                cp -r /tmp/RoslynBuildDependencies/PortableReferenceAssemblies/* $$MONO_DOTNET_PORTABLE_DIR; \
                cp /tmp/RoslynBuildDependencies/NuGetTargets/* $$MONO_NUGET_TARGETS_DIR; \
index 5b907267935346d2fe110d226bf3a62abcbd0dc6..6b3dd0b5a0f5ebd75d4be8070f711805c0f948f1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5b907267935346d2fe110d226bf3a62abcbd0dc6
+Subproject commit 6b3dd0b5a0f5ebd75d4be8070f711805c0f948f1
index a60df154aebfcee882cb4023e6c9683b76a274d4..316dcc886cdcb804a8eb441fd5f26735fa95d8ef 100644 (file)
-<html>\r
-\r
-<head>\r
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">\r
-<meta name=Generator content="Microsoft Word 12 (filtered)">\r
-\r
-<style>\r
-<!--\r
- /* Font Definitions */\r
- @font-face\r
-       {font-family:"Cambria Math";\r
-       panose-1:2 4 5 3 5 4 6 3 2 4;}\r
-@font-face\r
-       {font-family:Cambria;\r
-       panose-1:2 4 5 3 5 4 6 3 2 4;}\r
-@font-face\r
-       {font-family:Tahoma;\r
-       panose-1:2 11 6 4 3 5 4 4 2 4;}\r
-@font-face\r
-       {font-family:Verdana;\r
-       panose-1:2 11 6 4 3 5 4 4 2 4;}\r
- /* Style Definitions */\r
- p.MsoNormal, li.MsoNormal, div.MsoNormal\r
-       {margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:12.0pt;\r
-       font-family:"Arial","sans-serif";}\r
-h1\r
-       {mso-style-link:"Heading 1 Char";\r
-       margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:12.0pt;\r
-       font-family:"Arial","sans-serif";\r
-       font-weight:normal;}\r
-h2\r
-       {mso-style-link:"Heading 2 Char";\r
-       margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:12.0pt;\r
-       font-family:"Arial","sans-serif";\r
-       font-weight:normal;}\r
-p.MsoCommentText, li.MsoCommentText, div.MsoCommentText\r
-       {mso-style-link:"Comment Text Char";\r
-       margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:10.0pt;\r
-       font-family:"Arial","sans-serif";}\r
-p.MsoHeader, li.MsoHeader, div.MsoHeader\r
-       {mso-style-link:"Header Char";\r
-       margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:12.0pt;\r
-       font-family:"Arial","sans-serif";}\r
-p.MsoFooter, li.MsoFooter, div.MsoFooter\r
-       {mso-style-link:"Footer Char";\r
-       margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:12.0pt;\r
-       font-family:"Arial","sans-serif";}\r
-span.MsoCommentReference\r
-       {font-family:"Times New Roman","serif";}\r
-p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject\r
-       {mso-style-link:"Comment Subject Char";\r
-       margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:10.0pt;\r
-       font-family:"Arial","sans-serif";\r
-       font-weight:bold;}\r
-p.MsoAcetate, li.MsoAcetate, div.MsoAcetate\r
-       {mso-style-link:"Balloon Text Char";\r
-       margin:0in;\r
-       margin-bottom:.0001pt;\r
-       text-autospace:none;\r
-       font-size:8.0pt;\r
-       font-family:"Tahoma","sans-serif";}\r
-span.Heading1Char\r
-       {mso-style-name:"Heading 1 Char";\r
-       mso-style-link:"Heading 1";\r
-       font-family:"Cambria","serif";\r
-       font-weight:bold;}\r
-span.Heading2Char\r
-       {mso-style-name:"Heading 2 Char";\r
-       mso-style-link:"Heading 2";\r
-       font-family:"Cambria","serif";\r
-       font-weight:bold;\r
-       font-style:italic;}\r
-span.BalloonTextChar\r
-       {mso-style-name:"Balloon Text Char";\r
-       mso-style-link:"Balloon Text";\r
-       font-family:"Tahoma","sans-serif";}\r
-span.CommentTextChar\r
-       {mso-style-name:"Comment Text Char";\r
-       mso-style-link:"Comment Text";\r
-       font-family:"Arial","sans-serif";}\r
-span.CommentSubjectChar\r
-       {mso-style-name:"Comment Subject Char";\r
-       mso-style-link:"Comment Subject";\r
-       font-family:"Arial","sans-serif";\r
-       font-weight:bold;}\r
-span.HeaderChar\r
-       {mso-style-name:"Header Char";\r
-       mso-style-link:Header;\r
-       font-family:"Arial","sans-serif";}\r
-span.FooterChar\r
-       {mso-style-name:"Footer Char";\r
-       mso-style-link:Footer;\r
-       font-family:"Arial","sans-serif";}\r
- /* Page Definitions */\r
- @page Section1\r
-       {size:8.5in 11.0in;\r
-       margin:1.0in 1.0in 1.0in 1.0in;}\r
-div.Section1\r
-       {page:Section1;}\r
--->\r
-</style>\r
-\r
-</head>\r
-\r
-<body lang=EN-US style='text-justify-trim:punctuation'>\r
-\r
-<div class=Section1>\r
-\r
-<h1 style='margin-top:9.0pt'><span style='font-size:15.5pt;color:black'>Microsoft\r
-Permissive License (Ms-PL)</span></h1>\r
-\r
-<p class=MsoNormal style='line-height:140%'><b><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>&nbsp;</span></b></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><b><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>This license governs use\r
-of the accompanying software. If you use the software, you accept this license.\r
-If you do not accept the license, do not use the software.</span></b></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>&nbsp;</span></p>\r
-\r
-<h2><b><span style='font-size:11.5pt;font-family:"Verdana","sans-serif"'>1.\r
-Definitions</span></b></h2>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>The terms \93reproduce,\94\r
-\93reproduction,\94 \93derivative works,\94 and \93distribution\94 have the same meaning\r
-here as under U.S. copyright law.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>A \93contribution\94 is the\r
-original software, or any additions or changes to the software.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>A \93contributor\94 is any\r
-person that distributes its contribution under this license.</span></p>\r
-\r
-<p class=MsoNormal><span style='font-size:8.5pt;font-family:"Verdana","sans-serif"'> \93Licensed\r
-patents\94 are a contributor\92s patent claims that read directly on its\r
-contribution.</span></p>\r
-\r
-<h2><b><span style='font-size:11.5pt;font-family:"Verdana","sans-serif"'>&nbsp;</span></b></h2>\r
-\r
-<h2><b><span style='font-size:11.5pt;font-family:"Verdana","sans-serif"'>2.\r
-Grant of Rights</span></b></h2>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>(A) Copyright Grant-\r
-Subject to the terms of this license, including the license conditions and\r
-limitations in section 3, each contributor grants you a non-exclusive,\r
-worldwide, royalty-free copyright license to reproduce its contribution,\r
-prepare derivative works of its contribution, and distribute its contribution\r
-or any derivative works that you create.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>(B) Patent Grant- Subject\r
-to the terms of this license, including the license conditions and limitations\r
-in section 3, each contributor grants you a non-exclusive, worldwide,\r
-royalty-free license under its licensed patents to make, have made, use, sell,\r
-offer for sale, import, and/or otherwise dispose of its contribution in the\r
-software or derivative works of the contribution in the software.</span></p>\r
-\r
-<h2><b><span style='font-size:11.5pt;font-family:"Verdana","sans-serif"'>&nbsp;</span></b></h2>\r
-\r
-<h2><b><span style='font-size:11.5pt;font-family:"Verdana","sans-serif"'>3.\r
-Conditions and Limitations</span></b></h2>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'> (A) No Trademark License-\r
-This license does not grant you rights to use any contributors\92 name, logo, or\r
-trademarks.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>(B) If you bring a patent\r
-claim against any contributor over patents that you claim are infringed by the\r
-software, your patent license from such contributor to the software ends\r
-automatically.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>(C) If you distribute any\r
-portion of the software, you must retain all copyright, patent, trademark, and\r
-attribution notices that are present in the software.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>(D) If you distribute any\r
-portion of the software in source code form, you may do so only under this\r
-license by including a complete copy of this license with your distribution. If\r
-you distribute any portion of the software in compiled or object code form, you\r
-may only do so under a license that complies with this license.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>(E) The software is\r
-licensed \93as-is.\94 You bear the risk of using it. The contributors give no\r
-express warranties, guarantees or conditions. You may have additional consumer\r
-rights under your local laws which this license cannot change. To the extent\r
-permitted under your local laws, the contributors exclude the implied\r
-warranties of merchantability, fitness for a particular purpose and\r
-non-infringement.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>(F) If you distribute the\r
-software or derivative works with programs you develop, you agree to </span><span\r
-style='font-size:8.5pt;line-height:140%;font-family:"Verdana","sans-serif"'>indemnify,\r
-defend, and hold harmless all contributors from any claims, including\r
-attorneys\92 fees, related to the distribution or use of your programs.  For\r
-clarity, you have no such obligations to a contributor for any claims based\r
-solely on the unmodified contributions of that contributor.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'> (G) If you make any\r
-additions or changes to the original software, you may only distribute them\r
-under a new namespace.  In addition, you will clearly identify your changes or\r
-additions as your own.</span></p>\r
-\r
-<p class=MsoNormal style='line-height:140%'><span style='font-size:8.5pt;\r
-line-height:140%;font-family:"Verdana","sans-serif"'>&nbsp;</span></p>\r
-\r
-</div>\r
-\r
-</body>\r
-\r
-</html>\r
+<html>
+
+<head>
+<title>MIT License</title>
+</head>
+
+<body>
+
+<p><b>This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.</b></p>
+
+<pre>
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+</pre>
+
+</body>
+
+</html>
index 716df15e60aaece8709997745707c2b63e8a9672..60fcec9fb7628639b1fe964ea084d3a1a1830060 100644 (file)
@@ -47,6 +47,16 @@ ifdef CLR_PROFILE
 LIB_REFS += Mono.Posix
 endif
 
+CC_PROFILE := $(filter monotouch% xammac, $(PROFILE))
+ifdef CC_PROFILE
+BUILT_SOURCES = \
+       ../corlib/CommonCrypto/AesManaged.g.cs \
+       ../corlib/CommonCrypto/AesCryptoServiceProvider.g.cs
+
+../corlib/CommonCrypto/%.g.cs:
+       $(MAKE) -C ../corlib/CommonCrypto
+endif
+
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 include ../../build/library.make
index 6b6d96c25a26397c17d3d29deeb327f14a235814..7d32d44a88bd84c6036228fd2caebd01a9efbf7b 100644 (file)
@@ -1,4 +1,2 @@
 #include common_System.Core.dll.sources
 #include interpreter_System.Core.dll.sources
-../corlib/CommonCrypto/AesManaged.g.cs
-../corlib/CommonCrypto/AesCryptoServiceProvider.g.cs
index 7d32d44a88bd84c6036228fd2caebd01a9efbf7b..b050f33be704a921beae2be322fe8df90b6b0afe 100644 (file)
@@ -1,2 +1 @@
-#include common_System.Core.dll.sources
-#include interpreter_System.Core.dll.sources
+#include monotouch_System.Core.dll.sources
index 7d32d44a88bd84c6036228fd2caebd01a9efbf7b..b050f33be704a921beae2be322fe8df90b6b0afe 100644 (file)
@@ -1,2 +1 @@
-#include common_System.Core.dll.sources
-#include interpreter_System.Core.dll.sources
+#include monotouch_System.Core.dll.sources
index 6ab44f0f8c2cb558e83d94f40731fe88409b4703..ffee84a901d63aa9ce622a669154efd6bc8560e3 100644 (file)
@@ -1,5 +1,3 @@
 #include common_System.Core.dll.sources
 
 #include dynamic_System.Core.dll.sources
-../corlib/CommonCrypto/AesManaged.g.cs
-../corlib/CommonCrypto/AesCryptoServiceProvider.g.cs
index 78f1d450916ebcef407256b2c6c0e626b17d08e6..4d0245c3746575153ead243e9585a895028811ae 100644 (file)
@@ -36,12 +36,12 @@ namespace System.Windows.Media {
        [ValueSerializer (typeof (MatrixValueSerializer))]
        public struct Matrix : IFormattable {
 
-               double m11;
-               double m12;
-               double m21;
-               double m22;
-               double offsetX;
-               double offsetY;
+               double _m11;
+               double _m12;
+               double _m21;
+               double _m22;
+               double _offsetX;
+               double _offsetY;
 
                public Matrix (double m11,
                               double m12,
@@ -50,12 +50,12 @@ namespace System.Windows.Media {
                               double offsetX,
                               double offsetY)
                {
-                       this.m11 = m11;
-                       this.m12 = m12;
-                       this.m21 = m21;
-                       this.m22 = m22;
-                       this.offsetX = offsetX;
-                       this.offsetY = offsetY;
+                       this._m11 = m11;
+                       this._m12 = m12;
+                       this._m21 = m21;
+                       this._m22 = m22;
+                       this._offsetX = offsetX;
+                       this._offsetY = offsetY;
                }
 
                public void Append (Matrix matrix)
@@ -67,30 +67,30 @@ namespace System.Windows.Media {
                        double _offsetX;
                        double _offsetY;
 
-                       _m11 = m11 * matrix.M11 + m12 * matrix.M21;
-                       _m12 = m11 * matrix.M12 + m12 * matrix.M22;
-                       _m21 = m21 * matrix.M11 + m22 * matrix.M21;
-                       _m22 = m21 * matrix.M12 + m22 * matrix.M22;
+                       _m11 = this._m11 * matrix.M11 + this._m12 * matrix.M21;
+                       _m12 = this._m11 * matrix.M12 + this._m12 * matrix.M22;
+                       _m21 = this._m21 * matrix.M11 + this._m22 * matrix.M21;
+                       _m22 = this._m21 * matrix.M12 + this._m22 * matrix.M22;
 
-                       _offsetX = offsetX * matrix.M11 + offsetY * matrix.M21 + matrix.OffsetX;
-                       _offsetY = offsetX * matrix.M12 + offsetY * matrix.M22 + matrix.OffsetY;
+                       _offsetX = this._offsetX * matrix.M11 + this._offsetY * matrix.M21 + matrix.OffsetX;
+                       _offsetY = this._offsetX * matrix.M12 + this._offsetY * matrix.M22 + matrix.OffsetY;
 
-                       m11 = _m11;
-                       m12 = _m12;
-                       m21 = _m21;
-                       m22 = _m22;
-                       offsetX = _offsetX;
-                       offsetY = _offsetY;
+                       this._m11 = _m11;
+                       this._m12 = _m12;
+                       this._m21 = _m21;
+                       this._m22 = _m22;
+                       this._offsetX = _offsetX;
+                       this._offsetY = _offsetY;
                }
 
                public bool Equals (Matrix value)
                {
-                       return (m11 == value.M11 &&
-                               m12 == value.M12 &&
-                               m21 == value.M21 &&
-                               m22 == value.M22 &&
-                               offsetX == value.OffsetX &&
-                               offsetY == value.OffsetY);
+                       return (_m11 == value.M11 &&
+                               _m12 == value.M12 &&
+                               _m21 == value.M21 &&
+                               _m22 == value.M22 &&
+                               _offsetX == value.OffsetX &&
+                               _offsetY == value.OffsetY);
                }
 
                public override bool Equals (object o)
@@ -121,20 +121,20 @@ namespace System.Windows.Media {
 
                        /* 1/(ad-bc)[d -b; -c a] */
 
-                       double _m11 = m22;
-                       double _m12 = -m12;
-                       double _m21 = -m21;
-                       double _m22 = m11;
+                       double _m11 = this._m22;
+                       double _m12 = -this._m12;
+                       double _m21 = -this._m21;
+                       double _m22 = this._m11;
 
-                       double _offsetX = m21 * offsetY - m22 * offsetX;
-                       double _offsetY = m12 * offsetX - m11 * offsetY;
+                       double _offsetX = this._m21 * this._offsetY - this._m22 * this._offsetX;
+                       double _offsetY = this._m12 * this._offsetX - this._m11 * this._offsetY;
 
-                       m11 = _m11 / d;
-                       m12 = _m12 / d;
-                       m21 = _m21 / d;
-                       m22 = _m22 / d;
-                       offsetX = _offsetX / d;
-                       offsetY = _offsetY / d;
+                       this._m11 = _m11 / d;
+                       this._m12 = _m12 / d;
+                       this._m21 = _m21 / d;
+                       this._m22 = _m22 / d;
+                       this._offsetX = _offsetX / d;
+                       this._offsetY = _offsetY / d;
                }
 
                public static Matrix Multiply (Matrix trans1,
@@ -179,20 +179,20 @@ namespace System.Windows.Media {
                        double _offsetX;
                        double _offsetY;
 
-                       _m11 = matrix.M11 * m11 + matrix.M12 * m21;
-                       _m12 = matrix.M11 * m12 + matrix.M12 * m22;
-                       _m21 = matrix.M21 * m11 + matrix.M22 * m21;
-                       _m22 = matrix.M21 * m12 + matrix.M22 * m22;
+                       _m11 = matrix.M11 * this._m11 + matrix.M12 * this._m21;
+                       _m12 = matrix.M11 * this._m12 + matrix.M12 * this._m22;
+                       _m21 = matrix.M21 * this._m11 + matrix.M22 * this._m21;
+                       _m22 = matrix.M21 * this._m12 + matrix.M22 * this._m22;
 
-                       _offsetX = matrix.OffsetX * m11 + matrix.OffsetY * m21 + offsetX;
-                       _offsetY = matrix.OffsetX * m12 + matrix.OffsetY * m22 + offsetY;
+                       _offsetX = matrix.OffsetX * this._m11 + matrix.OffsetY * this._m21 + this._offsetX;
+                       _offsetY = matrix.OffsetX * this._m12 + matrix.OffsetY * this._m22 + this._offsetY;
 
-                       m11 = _m11;
-                       m12 = _m12;
-                       m21 = _m21;
-                       m22 = _m22;
-                       offsetX = _offsetX;
-                       offsetY = _offsetY;
+                       this._m11 = _m11;
+                       this._m12 = _m12;
+                       this._m21 = _m21;
+                       this._m22 = _m22;
+                       this._offsetX = _offsetX;
+                       this._offsetY = _offsetY;
                }
 
                public void Rotate (double angle)
@@ -272,9 +272,9 @@ namespace System.Windows.Media {
 
                public void SetIdentity ()
                {
-                       m11 = m22 = 1.0;
-                       m12 = m21 = 0.0;
-                       offsetX = offsetY = 0.0;
+                       _m11 = _m22 = 1.0;
+                       _m12 = _m21 = 0.0;
+                       _offsetX = _offsetY = 0.0;
                }
 
                public void Skew (double skewX,
@@ -306,7 +306,7 @@ namespace System.Windows.Media {
                                return "Identity";
                        else
                                return string.Format ("{0},{1},{2},{3},{4},{5}",
-                                                     m11, m12, m21, m22, offsetX, offsetY);
+                                                     _m11, _m12, _m21, _m22, _offsetX, _offsetY);
                }
 
                public string ToString (IFormatProvider provider)
@@ -339,8 +339,8 @@ namespace System.Windows.Media {
                public void Translate (double offsetX,
                                       double offsetY)
                {
-                       this.offsetX += offsetX;
-                       this.offsetY += offsetY;
+                       this._offsetX += offsetX;
+                       this._offsetY += offsetY;
                }
 
                public void TranslatePrepend (double offsetX,
@@ -352,7 +352,7 @@ namespace System.Windows.Media {
                }
 
                public double Determinant {
-                       get { return m11 * m22 - m12 * m21; }
+                       get { return _m11 * _m22 - _m12 * _m21; }
                }
 
                public bool HasInverse {
@@ -368,28 +368,28 @@ namespace System.Windows.Media {
                }
 
                public double M11 { 
-                       get { return m11; }
-                       set { m11 = value; }
+                       get { return _m11; }
+                       set { _m11 = value; }
                }
                public double M12 { 
-                       get { return m12; }
-                       set { m12 = value; }
+                       get { return _m12; }
+                       set { _m12 = value; }
                }
                public double M21 { 
-                       get { return m21; }
-                       set { m21 = value; }
+                       get { return _m21; }
+                       set { _m21 = value; }
                }
                public double M22 { 
-                       get { return m22; }
-                       set { m22 = value; }
+                       get { return _m22; }
+                       set { _m22 = value; }
                }
                public double OffsetX { 
-                       get { return offsetX; }
-                       set { offsetX = value; }
+                       get { return _offsetX; }
+                       set { _offsetX = value; }
                }
                public double OffsetY { 
-                       get { return offsetY; }
-                       set { offsetY = value; }
+                       get { return _offsetY; }
+                       set { _offsetY = value; }
                }
        }
 
index 9c014ddf5625c1ba8803a6b9a0dc5bcab6c39470..f2b464be1e5b68808a2d0b9f6168842dae539650 100644 (file)
@@ -38,14 +38,14 @@ namespace System.Windows {
        [ValueSerializer (typeof(Int32RectValueSerializer))]
        public struct Int32Rect : IFormattable
        {
-               int x, y, width, height;
+               int _x, _y, _width, _height;
 
                public Int32Rect (int x, int y, int width, int height)
                {
-                       this.x = x;
-                       this.y = y;
-                       this.width = width;
-                       this.height = height;
+                       this._x = x;
+                       this._y = y;
+                       this._width = width;
+                       this._height = height;
                }
 
                public static bool operator != (Int32Rect int32Rect1, Int32Rect int32Rect2)
@@ -63,35 +63,35 @@ namespace System.Windows {
                }
 
                public int Height {
-                       get { return height; }
-                       set { height = value; }
+                       get { return _height; }
+                       set { _height = value; }
                }
 
                public bool IsEmpty {
-                       get { return width == 0 && height == 0; }
+                       get { return _width == 0 && _height == 0; }
                }
 
                public int Width {
-                       get { return width; }
-                       set { width = value; }
+                       get { return _width; }
+                       set { _width = value; }
                }
 
                public int X {
-                       get { return x; }
-                       set { x = value; }
+                       get { return _x; }
+                       set { _x = value; }
                }
 
                public int Y {
-                       get { return y; }
-                       set { y = value; }
+                       get { return _y; }
+                       set { _y = value; }
                }
 
                public bool Equals (Int32Rect value)
                {
-                       return (x == value.x &&
-                               y == value.y &&
-                               width == value.width &&
-                               height == value.height);
+                       return (_x == value._x &&
+                               _y == value._y &&
+                               _width == value._width &&
+                               _height == value._height);
                }
 
                public override bool Equals (object o)
@@ -121,7 +121,7 @@ namespace System.Windows {
                {
                        if (IsEmpty)
                                return "Empty";
-                       return String.Format ("{0},{1},{2},{3}", x, y, width, height);
+                       return String.Format ("{0},{1},{2},{3}", _x, _y, _width, _height);
                }
 
                public string ToString (IFormatProvider provider)
index e5296c6f1d8e141969d3efa65bb16f2f43d52466..206b0edd3ab7302b161d03cd78e98c01758da003 100644 (file)
@@ -39,18 +39,18 @@ namespace System.Windows {
        {
                public Point (double x, double y)
                {
-                       this.x = x;
-                       this.y = y;
+                       this._x = x;
+                       this._y = y;
                }
 
                public double X {
-                       get { return x; }
-                       set { x = value; }
+                       get { return _x; }
+                       set { _x = value; }
                }
 
                public double Y {
-                       get { return y; }
-                       set { y = value; }
+                       get { return _y; }
+                       set { _y = value; }
                }
 
                public override bool Equals (object o)
@@ -62,19 +62,19 @@ namespace System.Windows {
 
                public bool Equals (Point value)
                {
-                       return x == value.X && y == value.Y;
+                       return _x == value.X && _y == value.Y;
                }
 
                public override int GetHashCode ()
                {
-                   return (x.GetHashCode() ^ y.GetHashCode());
+                   return (_x.GetHashCode() ^ _y.GetHashCode());
                }
 
 
                public void Offset (double offsetX, double offsetY)
                {
-                       x += offsetX;
-                       y += offsetY;
+                       _x += offsetX;
+                       _y += offsetY;
                }
 
                public static Point Add (Point point, Vector vector)
@@ -179,7 +179,7 @@ namespace System.Windows {
                                seperator = ";";
                        else
                                seperator = ",";
-                       object[] ob = { this.x, seperator, this.y };
+                       object[] ob = { this._x, seperator, this._y };
 
                        return string.Format(formatProvider, "{0:" + format + "}{1}{2:" + format + "}", ob);
                }
@@ -189,7 +189,7 @@ namespace System.Windows {
                        return this.ToString(format, formatProvider);
                }
 
-               double x;
-               double y;
+               double _x;
+               double _y;
        }
 }
index 2c5f3c0e6192b5dd5d9a6464fec52bb8206b4687..fd38ec6c25ed169cbff90534070b583eb93b99be 100644 (file)
@@ -41,9 +41,9 @@ namespace System.Windows {
        {
                public Rect (Size size)
                {
-                       x = y = 0.0;
-                       width = size.Width;
-                       height = size.Height;
+                       _x = _y = 0.0;
+                       _width = size.Width;
+                       _height = size.Height;
                }
 
                public Rect (Point point, Vector vector) : this (point, Point.Add (point, vector))
@@ -52,21 +52,21 @@ namespace System.Windows {
                public Rect (Point point1, Point point2)
                {
                        if (point1.X < point2.X) {
-                               x = point1.X;
-                               width = point2.X - point1.X;
+                               _x = point1.X;
+                               _width = point2.X - point1.X;
                        }
                        else {
-                               x = point2.X;
-                               width = point1.X - point2.X;
+                               _x = point2.X;
+                               _width = point1.X - point2.X;
                        }
 
                        if (point1.Y < point2.Y) {
-                               y = point1.Y;
-                               height = point2.Y - point1.Y;
+                               _y = point1.Y;
+                               _height = point2.Y - point1.Y;
                        }
                        else {
-                               y = point2.Y;
-                               height = point1.Y - point2.Y;
+                               _y = point2.Y;
+                               _height = point1.Y - point2.Y;
                        }
                }
 
@@ -74,26 +74,26 @@ namespace System.Windows {
                {
                        if (width < 0 || height < 0)
                                throw new ArgumentException ("width and height must be non-negative.");
-                       this.x = x;
-                       this.y = y;
-                       this.width = width;
-                       this.height = height;
+                       this._x = x;
+                       this._y = y;
+                       this._width = width;
+                       this._height = height;
                }
 
                public Rect (Point location, Size size)
                {
-                       x = location.X;
-                       y = location.Y;
-                       width = size.Width;
-                       height = size.Height;
+                       _x = location.X;
+                       _y = location.Y;
+                       _width = size.Width;
+                       _height = size.Height;
                }
 
                public bool Equals (Rect value)
                {
-                       return (x == value.X &&
-                               y == value.Y &&
-                               width == value.Width &&
-                               height == value.Height);
+                       return (_x == value.X &&
+                               _y == value.Y &&
+                               _width == value.Width &&
+                               _height == value.Height);
                }
 
                public static bool operator != (Rect rect1, Rect rect2)
@@ -172,11 +172,11 @@ namespace System.Windows {
                public void Inflate (double width, double height)
                {
                        // XXX any error checking like in the static case?
-                       x -= width;
-                       y -= height;
+                       _x -= width;
+                       _y -= height;
 
-                       this.width += 2*width;
-                       this.height += 2*height;
+                       this._width += 2*width;
+                       this._height += 2*height;
                }
 
                public void Inflate (Size size)
@@ -192,20 +192,20 @@ namespace System.Windows {
 
                public void Intersect(Rect rect)
                {
-                       double _x = Math.Max (x, rect.x);
-                       double _y = Math.Max (y, rect.y);
+                       double _x = Math.Max (this._x, rect._x);
+                       double _y = Math.Max (this._y, rect._y);
                        double _width = Math.Min (Right, rect.Right) - _x;
                        double _height = Math.Min (Bottom, rect.Bottom) - _y; 
 
                        if (_width < 0 || _height < 0) {
-                               x = y = Double.PositiveInfinity;
-                               width = height = Double.NegativeInfinity;
+                               this._x = this._y = Double.PositiveInfinity;
+                               this._width = this._height = Double.NegativeInfinity;
                        }
                        else {
-                               x = _x;
-                               y = _y;
-                               width = _width;
-                               height = _height;
+                               this._x = _x;
+                               this._y = _y;
+                               this._width = _width;
+                               this._height = _height;
                        }
                }
 
@@ -218,8 +218,8 @@ namespace System.Windows {
 
                public void Offset(double offsetX, double offsetY)
                {
-                       x += offsetX;
-                       y += offsetY;
+                       _x += offsetX;
+                       _y += offsetY;
                }
 
                public static Rect Offset(Rect rect, double offsetX, double offsetY)
@@ -231,8 +231,8 @@ namespace System.Windows {
 
                public void Offset (Vector offsetVector)
                {
-                       x += offsetVector.X;
-                       y += offsetVector.Y;
+                       _x += offsetVector.X;
+                       _y += offsetVector.Y;
                }
 
                public static Rect Offset (Rect rect, Vector offsetVector)
@@ -244,10 +244,10 @@ namespace System.Windows {
 
                public void Scale(double scaleX, double scaleY)
                {
-                       x *= scaleX;
-                       y *= scaleY;
-                       width *= scaleX;
-                       height *= scaleY;
+                       _x *= scaleX;
+                       _y *= scaleY;
+                       _width *= scaleX;
+                       _height *= scaleY;
                }
 
                public void Transform (Matrix matrix)
@@ -283,10 +283,10 @@ namespace System.Windows {
                        var right = Math.Max (Right, rect.Right);
                        var bottom = Math.Max (Bottom, rect.Bottom);
                        
-                       x = left;
-                       y = top;
-                       width = right - left;
-                       height = bottom - top;
+                       _x = left;
+                       _y = top;
+                       _width = right - left;
+                       _height = bottom - top;
                }
 
                public void Union(Point point)
@@ -336,37 +336,37 @@ namespace System.Windows {
                                "{{0:{0}}}{1}{{1:{0}}}{1}{{2:{0}}}{1}{{3:{0}}}",
                                format, separator);
                        return String.Format (provider, rectFormat,
-                               x, y, width, height);
+                               _x, _y, _width, _height);
                }
 
                public static Rect Empty { 
                        get {
                                Rect r = new Rect ();
-                               r.x = r.y = Double.PositiveInfinity;
-                               r.width = r.height = Double.NegativeInfinity;
+                               r._x = r._y = Double.PositiveInfinity;
+                               r._width = r._height = Double.NegativeInfinity;
                                return r;
                        } 
                }
                
                public bool IsEmpty { 
                        get {
-                               return (x == Double.PositiveInfinity &&
-                                       y == Double.PositiveInfinity &&
-                                       width == Double.NegativeInfinity &&
-                                       height == Double.NegativeInfinity);
+                               return (_x == Double.PositiveInfinity &&
+                                       _y == Double.PositiveInfinity &&
+                                       _width == Double.NegativeInfinity &&
+                                       _height == Double.NegativeInfinity);
                        }
                }
                
                public Point Location { 
                        get {
-                               return new Point (x, y);
+                               return new Point (_x, _y);
                        }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Rect.");
 
-                               x = value.X;
-                               y = value.Y;
+                               _x = value.X;
+                               _y = value.Y;
                        }
                }
                
@@ -374,39 +374,39 @@ namespace System.Windows {
                        get { 
                                if (IsEmpty)
                                        return Size.Empty; 
-                               return new Size (width, height);
+                               return new Size (_width, _height);
                        }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Rect.");
 
-                               width = value.Width;
-                               height = value.Height;
+                               _width = value.Width;
+                               _height = value.Height;
                        }
                }
 
                public double X {
-                       get { return x; }
+                       get { return _x; }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Rect.");
 
-                               x = value;
+                               _x = value;
                        }
                }
 
                public double Y {
-                       get { return y; }
+                       get { return _y; }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Rect.");
 
-                               y = value;
+                               _y = value;
                        }
                }
 
                public double Width {
-                       get { return width; }
+                       get { return _width; }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Rect.");
@@ -414,12 +414,12 @@ namespace System.Windows {
                                if (value < 0)
                                        throw new ArgumentException ("width must be non-negative.");
 
-                               width = value;
+                               _width = value;
                        }
                }
 
                public double Height {
-                       get { return height; }
+                       get { return _height; }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Rect.");
@@ -427,24 +427,24 @@ namespace System.Windows {
                                if (value < 0)
                                        throw new ArgumentException ("height must be non-negative.");
 
-                               height = value;
+                               _height = value;
                        }
                }
 
                public double Left { 
-                       get { return x; }
+                       get { return _x; }
                }
 
                public double Top { 
-                       get { return y; }
+                       get { return _y; }
                }
                
                public double Right { 
-                       get { return x + width; }
+                       get { return _x + _width; }
                }
                
                public double Bottom { 
-                       get { return y + height; }
+                       get { return _y + _height; }
                }
                
                public Point TopLeft { 
@@ -463,9 +463,9 @@ namespace System.Windows {
                        get { return new Point (Right, Bottom); }
                }
                
-               double x;
-               double y;
-               double width;
-               double height;
+               double _x;
+               double _y;
+               double _width;
+               double _height;
        }
 }
index 9e45b1a81d1f1199dcdb077998b6796e8ddac8db..729bfd07882a8243f40d72cd9517f2be109e017d 100644 (file)
@@ -40,13 +40,13 @@ namespace System.Windows {
                        if (width < 0 || height < 0)
                                throw new ArgumentException ("Width and Height must be non-negative.");
 
-                       this.width = width;
-                       this.height = height;
+                       this._width = width;
+                       this._height = height;
                }
 
                public bool Equals (Size value)
                {
-                       return width == value.Width && height == value.Height;
+                       return _width == value.Width && _height == value.Height;
                }
                
                public override bool Equals (object o)
@@ -76,7 +76,7 @@ namespace System.Windows {
                {
                        if (IsEmpty)
                                return "Empty";
-                       return String.Format ("{0},{1}", width, height);
+                       return String.Format ("{0},{1}", _width, _height);
                }
 
                public string ToString (IFormatProvider provider)
@@ -91,13 +91,13 @@ namespace System.Windows {
 
                public bool IsEmpty {
                        get {
-                               return (width == Double.NegativeInfinity &&
-                                       height == Double.NegativeInfinity);
+                               return (_width == Double.NegativeInfinity &&
+                                       _height == Double.NegativeInfinity);
                        }
                }
 
                public double Height {
-                       get { return height; }
+                       get { return _height; }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Size.");
@@ -105,12 +105,12 @@ namespace System.Windows {
                                if (value < 0)
                                        throw new ArgumentException ("height must be non-negative.");
 
-                               height = value;
+                               _height = value;
                        }
                }
 
                public double Width {
-                       get { return width; }
+                       get { return _width; }
                        set {
                                if (IsEmpty)
                                        throw new InvalidOperationException ("Cannot modify this property on the Empty Size.");
@@ -118,14 +118,14 @@ namespace System.Windows {
                                if (value < 0)
                                        throw new ArgumentException ("width must be non-negative.");
 
-                               width = value;
+                               _width = value;
                        }
                }
 
                public static Size Empty {
                        get {
                                Size s = new Size ();
-                               s.width = s.height = Double.NegativeInfinity;
+                               s._width = s._height = Double.NegativeInfinity;
                                return s;
                        }
                }
@@ -151,7 +151,7 @@ namespace System.Windows {
                        return !size1.Equals (size2);
                }
 
-               double width;
-               double height;
+               double _width;
+               double _height;
        }
 }
index 794f6b8309c60a4c5ddd3bb62b5e665f7347f566..5ed53c3e249cbab2c7ca461a8082147f3b16218a 100644 (file)
@@ -38,13 +38,13 @@ namespace System.Windows {
        {
                public Vector (double x, double y)
                {
-                       this.x = x;
-                       this.y = y;
+                       this._x = x;
+                       this._y = y;
                }
 
                public bool Equals (Vector value)
                {
-                       return x == value.X && y == value.Y;
+                       return _x == value.X && _y == value.Y;
                }
 
                public override bool Equals (object o)
@@ -62,7 +62,7 @@ namespace System.Windows {
 
                string IFormattable.ToString (string format, IFormatProvider provider)
                {
-                       return string.Format (provider, "{0:" + format + "},{1:" + format + "}", x, y);
+                       return string.Format (provider, "{0:" + format + "},{1:" + format + "}", _x, _y);
                }
 
                public static bool Equals (Vector vector1, Vector vector2)
@@ -128,8 +128,8 @@ namespace System.Windows {
 
                public void Negate ()
                {
-                       x = -x;
-                       y = -y;
+                       _x = -_x;
+                       _y = -_y;
                }
 
                public void Normalize ()
@@ -139,8 +139,8 @@ namespace System.Windows {
                                return;
 
                        double l = Math.Sqrt (ls);
-                       x /= l;
-                       y /= l;
+                       _x /= l;
+                       _y /= l;
                }
 
                public static Vector Subtract (Vector vector1, Vector vector2)
@@ -155,7 +155,7 @@ namespace System.Windows {
 
                public override string ToString ()
                {
-                       return String.Format ("{0},{1}", x, y);
+                       return String.Format ("{0},{1}", _x, _y);
                }
 
                public string ToString (IFormatProvider provider)
@@ -168,17 +168,17 @@ namespace System.Windows {
                }
 
                public double LengthSquared {
-                       get { return x * x + y * y; }
+                       get { return _x * _x + _y * _y; }
                }
 
                public double X {
-                       get { return x; }
-                       set { x = value; }
+                       get { return _x; }
+                       set { _x = value; }
                }
 
                public double Y {
-                       get { return y; }
-                       set { y = value; }
+                       get { return _y; }
+                       set { _y = value; }
                }
 
                /* operators */
@@ -249,8 +249,8 @@ namespace System.Windows {
                        return Add (vector1, vector2);
                }
 
-               double x;
-               double y;
+               double _x;
+               double _y;
        }
 
 }
index 3203a94e3ccab1edf51f14726503d3457264ed51..13ad3babf0ce381d79e130b07af2002665ad447b 100644 (file)
@@ -37,6 +37,10 @@ RESOURCE_FILES = \
 
 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
 
+ifndef MOBILE_PROFILE
+REFERENCE_SOURCES_FLAGS += -d:FEATURE_MACL
+endif
+
 ifndef MOBILE_STATIC
 REFERENCE_SOURCES_FLAGS += -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY
 endif
@@ -75,10 +79,8 @@ CC_PROFILE := $(filter monotouch% xammac, $(PROFILE))
 ifdef CC_PROFILE
 
 BUILT_SOURCES = \
-       CommonCrypto/AesCryptoServiceProvider.g.cs \
        CommonCrypto/MD5CryptoServiceProvider.g.cs      \
        CommonCrypto/SHA256Managed.g.cs \
-       CommonCrypto/AesManaged.g.cs \
        CommonCrypto/RC2CryptoServiceProvider.g.cs \
        CommonCrypto/SHA384Managed.g.cs \
        CommonCrypto/DESCryptoServiceProvider.g.cs \
index ce498cb17c52dda886e1cee61a393f79114239b1..bedcf1af0c14a5bb94af6c4dc4bfc29dc8fc19a8 100644 (file)
@@ -602,6 +602,12 @@ namespace System
                        get;
                }
 
+#if MOBILE
+               static int get_core_clr_security_level ()
+               {
+                       return 1;
+               }
+#else
                //seclevel { transparent = 0, safe-critical = 1, critical = 2}
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern int get_core_clr_security_level ();
@@ -616,6 +622,7 @@ namespace System
 
                public override bool IsSecuritySafeCritical {
                        get { return get_core_clr_security_level () == 1; }
-               }               
+               }
+#endif
        }
 }
index a732d3eba0f5a602e660905a6b47db23f99ff5a8..aefc8b908f3bd79b5590e4beb52e2bb5356806ed 100644 (file)
@@ -1,16 +1,72 @@
+using System.IO;
+
 namespace Microsoft.Win32
 {
        static class Win32Native
        {
                internal const string ADVAPI32 = "advapi32.dll";
 
+               // Error codes from WinError.h
                internal const int ERROR_SUCCESS = 0x0;
+               internal const int ERROR_INVALID_FUNCTION = 0x1;
+               internal const int ERROR_FILE_NOT_FOUND = 0x2;
+               internal const int ERROR_PATH_NOT_FOUND = 0x3;
+               internal const int ERROR_ACCESS_DENIED  = 0x5;
+               internal const int ERROR_INVALID_HANDLE = 0x6;
+               internal const int ERROR_NOT_ENOUGH_MEMORY = 0x8;
+               internal const int ERROR_INVALID_DATA = 0xd;
+               internal const int ERROR_INVALID_DRIVE = 0xf;
+               internal const int ERROR_NO_MORE_FILES = 0x12;
+               internal const int ERROR_NOT_READY = 0x15;
+               internal const int ERROR_BAD_LENGTH = 0x18;
+               internal const int ERROR_SHARING_VIOLATION = 0x20;
+               internal const int ERROR_NOT_SUPPORTED = 0x32;
+               internal const int ERROR_FILE_EXISTS = 0x50;
+               internal const int ERROR_INVALID_PARAMETER = 0x57;
+               internal const int ERROR_BROKEN_PIPE = 0x6D;
+               internal const int ERROR_CALL_NOT_IMPLEMENTED = 0x78;
+               internal const int ERROR_INSUFFICIENT_BUFFER = 0x7A;
+               internal const int ERROR_INVALID_NAME = 0x7B;
+               internal const int ERROR_BAD_PATHNAME = 0xA1;
+               internal const int ERROR_ALREADY_EXISTS = 0xB7;
+               internal const int ERROR_ENVVAR_NOT_FOUND = 0xCB;
+               internal const int ERROR_FILENAME_EXCED_RANGE = 0xCE;  // filename too long.
+               internal const int ERROR_NO_DATA = 0xE8;
+               internal const int ERROR_PIPE_NOT_CONNECTED = 0xE9;
+               internal const int ERROR_MORE_DATA = 0xEA;
+               internal const int ERROR_DIRECTORY = 0x10B;
+               internal const int ERROR_OPERATION_ABORTED = 0x3E3;  // 995; For IO Cancellation
+               internal const int ERROR_NOT_FOUND = 0x490;          // 1168; For IO Cancellation
+               internal const int ERROR_NO_TOKEN = 0x3f0;
+               internal const int ERROR_DLL_INIT_FAILED = 0x45A;
+               internal const int ERROR_NON_ACCOUNT_SID = 0x4E9;
+               internal const int ERROR_NOT_ALL_ASSIGNED = 0x514;
+               internal const int ERROR_UNKNOWN_REVISION = 0x519;
+               internal const int ERROR_INVALID_OWNER = 0x51B;
+               internal const int ERROR_INVALID_PRIMARY_GROUP = 0x51C;
+               internal const int ERROR_NO_SUCH_PRIVILEGE = 0x521;
+               internal const int ERROR_PRIVILEGE_NOT_HELD = 0x522;
+               internal const int ERROR_NONE_MAPPED = 0x534;
+               internal const int ERROR_INVALID_ACL = 0x538;
+               internal const int ERROR_INVALID_SID = 0x539;
+               internal const int ERROR_INVALID_SECURITY_DESCR = 0x53A;
+               internal const int ERROR_BAD_IMPERSONATION_LEVEL = 0x542;
+               internal const int ERROR_CANT_OPEN_ANONYMOUS = 0x543;
+               internal const int ERROR_NO_SECURITY_ON_OBJECT = 0x546;
+               internal const int ERROR_TRUSTED_RELATIONSHIP_FAILURE = 0x6FD;
+
+               internal const FileAttributes FILE_ATTRIBUTE_DIRECTORY = FileAttributes.Directory;
 
                public static string GetMessage (int hr)
                {
                        return "Error " + hr;
                }
 
+               public static int MakeHRFromErrorCode (int errorCode)
+               {
+                       return unchecked(((int)0x80070000) | errorCode);
+               }
+
                public class SECURITY_ATTRIBUTES
                {
 
index 3c7e87a6b7ac78ad8fbe13e42343fb67337d0698..ed773f6ca6a4505c369c790a608b55bcfb0617af 100644 (file)
@@ -645,5 +645,28 @@ namespace System.IO
                                                 AccessControlSections.Group |
                                                 AccessControlSections.Access);
                }
+
+#region Copied from reference source
+        internal static String GetDemandDir(string fullPath, bool thisDirOnly)
+        {
+            String demandPath;
+
+            if (thisDirOnly) {
+                if (fullPath.EndsWith( Path.DirectorySeparatorChar ) 
+                    || fullPath.EndsWith( Path.AltDirectorySeparatorChar ) )
+                    demandPath = fullPath + ".";
+                else
+                    demandPath = fullPath + Path.DirectorySeparatorCharAsString + ".";
+            }
+            else {
+                if (!(fullPath.EndsWith( Path.DirectorySeparatorChar ) 
+                    || fullPath.EndsWith( Path.AltDirectorySeparatorChar )) )
+                    demandPath = fullPath + Path.DirectorySeparatorCharAsString;
+                else
+                    demandPath = fullPath;
+            }
+            return demandPath;
+        }
+#endregion
        }
 }
index 4f74c12bf8309441d336ed37bed907003651547f..d25432dcacdf559da372f14a60dde2ff5ca36fbb 100644 (file)
@@ -102,12 +102,13 @@ namespace System.IO {
 
                public override bool Exists {
                        get {
-                               Refresh (false);
+                               if (_dataInitialised == -1)
+                                       Refresh ();
 
-                               if (stat.Attributes == MonoIO.InvalidFileAttributes)
+                               if (_data.fileAttributes == MonoIO.InvalidFileAttributes)
                                        return false;
 
-                               if ((stat.Attributes & FileAttributes.Directory) == 0)
+                               if ((_data.fileAttributes & FileAttributes.Directory) == 0)
                                        return false;
 
                                return true;
@@ -458,6 +459,19 @@ namespace System.IO {
                        }
                }
                
-               
+               internal void CheckPath (string path)
+               {
+                       if (path == null)
+                               throw new ArgumentNullException ("path");
+                       if (path.Length == 0)
+                               throw new ArgumentException ("An empty file name is not valid.");
+                       if (path.IndexOfAny (Path.InvalidPathChars) != -1)
+                               throw new ArgumentException ("Illegal characters in path.");
+                       if (Environment.IsRunningOnWindows) {
+                               int idx = path.IndexOf (':');
+                               if (idx >= 0 && idx != 1)
+                                       throw new ArgumentException ("path");
+                       }
+               }
        }
 }
index 8f4b57290c822e271064aadd68ae09223bed966d..c6c32095cbf9aa19e422c014d1bcf41e32e43901 100644 (file)
@@ -113,6 +113,21 @@ namespace System.IO
                        }
                }
 
+               internal static String InternalCopy (String sourceFileName, String destFileName, bool overwrite, bool checkHost)
+               {
+                       String fullSourceFileName = Path.GetFullPathInternal(sourceFileName);
+                       String fullDestFileName = Path.GetFullPathInternal(destFileName);
+
+                       MonoIOError error;
+
+                       if (!MonoIO.CopyFile (fullSourceFileName, fullDestFileName, overwrite, out error)) {
+                               string p = Locale.GetText ("{0}\" or \"{1}", sourceFileName, destFileName);
+                               throw MonoIO.GetException (p, error);
+                       }
+
+                       return fullDestFileName;
+               }
+
                public static FileStream Create (string path)
                {
                        return Create (path, 8192);
@@ -406,6 +421,12 @@ namespace System.IO
                                                               "Destination and backup arguments are the same file."));
                        }
 
+                       var attrs = GetAttributes (fullDest);
+
+                       // TODO: Should be done in wapi, win32 api handles this already
+                       if ((attrs & FileAttributes.ReadOnly) != 0)
+                               throw MonoIO.GetException (MonoIOError.ERROR_ACCESS_DENIED);
+
                        if (!MonoIO.ReplaceFile (fullSource, fullDest, fullBackup, 
                                                 ignoreMetadataErrors, out error)) {
                                throw MonoIO.GetException (error);
@@ -688,5 +709,22 @@ namespace System.IO
                                        w.WriteLine (line);
                        }
                }
+
+               internal static int FillAttributeInfo (String path, ref MonoIOStat data, bool tryagain, bool returnErrorOnNotFound)
+               {
+                       if (tryagain)
+                               throw new NotImplementedException ();
+
+                       MonoIOError error;
+                       MonoIO.GetFileStat (path, out data, out error);
+
+                       if (!returnErrorOnNotFound && (error == MonoIOError.ERROR_FILE_NOT_FOUND || error == MonoIOError.ERROR_PATH_NOT_FOUND || error == MonoIOError.ERROR_NOT_READY)) {
+                               data = default (MonoIOStat);
+                               data.fileAttributes = (FileAttributes) (-1);
+                               return 0;
+                       }
+
+                       return (int) error;
+               }
        }
 }
diff --git a/mcs/class/corlib/System.IO/FileInfo.cs b/mcs/class/corlib/System.IO/FileInfo.cs
deleted file mode 100644 (file)
index 69e1f32..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-//------------------------------------------------------------------------------
-// 
-// System.IO.FileInfo.cs 
-//
-// Copyright (C) 2001 Moonlight Enterprises, All Rights Reserved
-// 
-// Author:         Jim Richardson, develop@wtfo-guru.com
-//                 Dan Lewis (dihlewis@yahoo.co.uk)
-// Created:        Monday, August 13, 2001 
-//
-//------------------------------------------------------------------------------
-
-//
-// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Runtime.InteropServices;
-using System.Runtime.Serialization;
-using System.Security;
-
-#if !MOBILE
-using System.Security.AccessControl;
-#endif
-
-namespace System.IO {
-
-       [Serializable]
-       [ComVisible (true)]
-       public sealed class FileInfo : FileSystemInfo
-       {
-               private bool exists;
-               private string displayPath;
-
-               public FileInfo (string fileName)
-               {
-                       if (fileName == null)
-                               throw new ArgumentNullException ("fileName");
-
-                       CheckPath (fileName);
-                       SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
-
-                       OriginalPath = fileName;
-                       FullPath = Path.GetFullPath (fileName);
-                       
-                       displayPath = OriginalPath;
-               }
-
-               private FileInfo (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-                       displayPath = OriginalPath;
-               }
-
-               internal override void InternalRefresh ()
-               {
-                       exists = File.Exists (FullPath);
-               }
-
-               // public properties
-
-               public override bool Exists {
-                       get {
-                               Refresh (false);
-
-                               if (stat.Attributes == MonoIO.InvalidFileAttributes)
-                                       return false;
-
-                               if ((stat.Attributes & FileAttributes.Directory) != 0)
-                                       return false;
-
-                               return exists;
-                       }
-               }
-
-               public override string Name {
-                       get {
-                               return Path.GetFileName (FullPath);
-                       }
-               }
-
-               public bool IsReadOnly {
-                       get {
-                               if (!Exists)
-                                       throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".", OriginalPath);
-                                       
-                               return ((stat.Attributes & FileAttributes.ReadOnly) != 0);
-                       }
-                               
-                       set {
-                               if (!Exists)
-                                       throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".", OriginalPath);
-                                       
-                               FileAttributes attrs = File.GetAttributes(FullPath);
-
-                               if (value) 
-                                       attrs |= FileAttributes.ReadOnly;
-                               else
-                                       attrs &= ~FileAttributes.ReadOnly;
-
-                               File.SetAttributes(FullPath, attrs);
-                       }
-               }
-
-               [MonoLimitation ("File encryption isn't supported (even on NTFS).")]
-               [ComVisible (false)]
-               public void Encrypt ()
-               {
-                       // MS.NET support this only on NTFS file systems, i.e. it's a file-system (not a framework) feature.
-                       // otherwise it throws a NotSupportedException (or a PlatformNotSupportedException on older OS).
-                       // we throw the same (instead of a NotImplementedException) because most code should already be
-                       // handling this exception to work properly.
-                       throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system."));
-               }
-
-               [MonoLimitation ("File encryption isn't supported (even on NTFS).")]
-               [ComVisible (false)]
-               public void Decrypt ()
-               {
-                       // MS.NET support this only on NTFS file systems, i.e. it's a file-system (not a framework) feature.
-                       // otherwise it throws a NotSupportedException (or a PlatformNotSupportedException on older OS).
-                       // we throw the same (instead of a NotImplementedException) because most code should already be
-                       // handling this exception to work properly.
-                       throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system."));
-               }
-
-               public long Length {
-                       get {
-                               if (!Exists)
-                                       throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".", OriginalPath);
-
-                               return stat.Length;
-                       }
-               }
-
-               public string DirectoryName {
-                       get {
-                               return Path.GetDirectoryName (FullPath);
-                       }
-               }
-
-               public DirectoryInfo Directory {
-                       get {
-                               return new DirectoryInfo (DirectoryName);
-                       }
-               }
-
-               // streamreader methods
-
-               public StreamReader OpenText ()
-               {
-                       return new StreamReader (Open (FileMode.Open, FileAccess.Read));
-               }
-
-               public StreamWriter CreateText ()
-               {
-                       return new StreamWriter (Open (FileMode.Create, FileAccess.Write));
-               }
-               
-               public StreamWriter AppendText ()
-               {
-                       return new StreamWriter (Open (FileMode.Append, FileAccess.Write));
-               }
-
-               // filestream methods
-
-               public FileStream Create ()
-               {
-                       return File.Create (FullPath);
-               }
-
-               public FileStream OpenRead ()
-               {
-                       return Open (FileMode.Open, FileAccess.Read, FileShare.Read);
-               }
-
-               public FileStream OpenWrite ()
-               {
-                       return Open (FileMode.OpenOrCreate, FileAccess.Write);
-               }
-
-               public FileStream Open (FileMode mode)
-               {
-                       return Open (mode, FileAccess.ReadWrite);
-               }
-
-               public FileStream Open (FileMode mode, FileAccess access)
-               {
-                       return Open (mode, access, FileShare.None);
-               }
-
-               public FileStream Open (FileMode mode, FileAccess access, FileShare share)
-               {
-                       return new FileStream (FullPath, mode, access, share);
-               }
-
-               // file methods
-
-               public override void Delete ()
-               {
-                       MonoIOError error;
-
-                       SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
-
-                       if (!MonoIO.Exists (FullPath, out error))
-                               // a weird MS.NET behaviour
-                               return;
-
-                       if (MonoIO.ExistsDirectory (FullPath, out error))
-                               throw new UnauthorizedAccessException ("Access to the path \"" + FullPath + "\" is denied.");
-                       if (!MonoIO.DeleteFile (FullPath, out error))
-                               throw MonoIO.GetException (OriginalPath, error);
-               }
-
-               public void MoveTo (string destFileName)
-               {
-                       if (destFileName == null)
-                               throw new ArgumentNullException ("destFileName");
-                       if (destFileName.Length == 0)
-                               throw new ArgumentException ("An empty file name is not valid.", "destFileName");
-
-                       var destFullPath = Path.GetFullPath (destFileName);
-                       if (destFullPath == FullPath)
-                               return;
-                       if (!File.Exists (FullPath))
-                               throw new FileNotFoundException ();
-
-                       File.Move (FullPath, destFullPath);
-                       this.FullPath = destFullPath;
-
-                       displayPath = destFileName;
-               }
-
-               public FileInfo CopyTo (string destFileName)
-               {
-                       return CopyTo (destFileName, false);
-               }
-
-               public FileInfo CopyTo (string destFileName, bool overwrite)
-               {
-                       if (destFileName == null)
-                               throw new ArgumentNullException ("destFileName");
-                       if (destFileName.Length == 0)
-                               throw new ArgumentException ("An empty file name is not valid.", "destFileName");
-
-                       string dest = Path.GetFullPath (destFileName);
-
-                       if (overwrite && File.Exists (dest))
-                               File.Delete (dest);
-
-                       File.Copy (FullPath, dest);
-               
-                       return new FileInfo (dest);
-               }
-
-               public override string ToString ()
-               {
-                       return displayPath;
-               }
-
-#if !MOBILE
-               public FileSecurity GetAccessControl ()
-               {
-                       return File.GetAccessControl (FullPath); 
-               }
-               
-               public FileSecurity GetAccessControl (AccessControlSections includeSections)
-               {
-                       return File.GetAccessControl (FullPath, includeSections);
-               }
-
-               [ComVisible (false)]
-               public FileInfo Replace (string destinationFileName,
-                                        string destinationBackupFileName)
-               {
-                       string destinationFullPath = null;
-                       if (!Exists)
-                               throw new FileNotFoundException ();
-                       if (destinationFileName == null)
-                               throw new ArgumentNullException ("destinationFileName");
-                       if (destinationFileName.Length == 0)
-                               throw new ArgumentException ("An empty file name is not valid.", "destinationFileName");
-
-                       destinationFullPath = Path.GetFullPath (destinationFileName);
-
-                       if (!File.Exists (destinationFullPath))
-                               throw new FileNotFoundException ();
-
-                       FileAttributes attrs = File.GetAttributes (destinationFullPath);
-
-                       if ( (attrs & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
-                                       throw new UnauthorizedAccessException (); 
-
-                       if (destinationBackupFileName != null) {
-                               if (destinationBackupFileName.Length == 0)
-                                       throw new ArgumentException ("An empty file name is not valid.", "destinationBackupFileName");
-                               File.Copy (destinationFullPath, Path.GetFullPath (destinationBackupFileName), true);
-                       }
-                       File.Copy (FullPath, destinationFullPath,true);
-                       File.Delete (FullPath);
-                       return new FileInfo (destinationFullPath);
-               }
-               
-               [ComVisible (false)]
-               [MonoLimitation ("We ignore the ignoreMetadataErrors parameter")]
-               public FileInfo Replace (string destinationFileName,
-                                        string destinationBackupFileName,
-                                        bool ignoreMetadataErrors)
-               {
-                       return Replace (destinationFileName, destinationBackupFileName);
-               }
-
-               public void SetAccessControl (FileSecurity fileSecurity)
-               {
-                       File.SetAccessControl (FullPath, fileSecurity);
-               }
-#endif
-       }
-}
diff --git a/mcs/class/corlib/System.IO/FileSystemInfo.cs b/mcs/class/corlib/System.IO/FileSystemInfo.cs
deleted file mode 100644 (file)
index 9c2c3fa..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-//------------------------------------------------------------------------------
-// 
-// System.IO.FileSystemInfo.cs 
-//
-// Copyright (C) 2001 Moonlight Enterprises, All Rights Reserved
-// Copyright 2011 Xamarin Inc (http://www.xamarin.com).
-// 
-// Author:         Jim Richardson, develop@wtfo-guru.com
-//                 Dan Lewis (dihlewis@yahoo.co.uk)
-// Created:        Monday, August 13, 2001 
-//
-//------------------------------------------------------------------------------
-
-//
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Runtime.InteropServices;
-using System.Runtime.Serialization;
-using System.Security;
-using System.Security.Permissions;
-
-namespace System.IO {
-       
-       [Serializable]
-       [FileIOPermission (SecurityAction.InheritanceDemand, Unrestricted = true)]
-       [ComVisible (true)]
-#if NET_2_1
-       public abstract class FileSystemInfo {
-#else
-       public abstract class FileSystemInfo : MarshalByRefObject, ISerializable {
-
-               #region Implementation of ISerializable
-
-               [ComVisible(false)]
-               public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
-               {
-                       info.AddValue ("OriginalPath", OriginalPath, typeof(string));
-                       info.AddValue ("FullPath", FullPath, typeof(string));
-               }
-
-               #endregion Implementation of ISerializable
-#endif
-               // public properties
-
-               public abstract bool Exists { get; }
-
-               public abstract string Name { get; }
-
-               public virtual string FullName {
-                       get {
-                               return FullPath;
-                       }
-               }
-
-               public string Extension {
-                       get {
-                               return Path.GetExtension (Name);
-                       }
-               }
-
-               public FileAttributes Attributes {
-                       get {
-                               Refresh (false);
-                               return stat.Attributes;
-                       }
-
-                       set {
-                               MonoIOError error;
-                               
-                               if (!MonoIO.SetFileAttributes (FullName,
-                                                              value,
-                                                              out error))
-                                       throw MonoIO.GetException (FullName,
-                                                                  error);
-                               Refresh (true);
-                       }
-               }
-
-               public DateTime CreationTime {
-                       get {
-                               Refresh (false);
-                               return DateTime.FromFileTime (stat.CreationTime);
-                       }
-
-                       set {
-                               SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
-
-                               long filetime = value.ToFileTime ();
-                       
-                               MonoIOError error;
-                               
-                               if (!MonoIO.SetFileTime (FullName, filetime,
-                                                        -1, -1, out error))
-                                       throw MonoIO.GetException (FullName,
-                                                                  error);
-                               Refresh (true);
-                       }
-               }
-
-               [ComVisible(false)]
-               public DateTime CreationTimeUtc {
-                       get {
-                               return CreationTime.ToUniversalTime ();
-                       }
-
-                       set {
-                               CreationTime = value.ToLocalTime ();
-                       }
-               }
-
-               public DateTime LastAccessTime {
-                       get {
-                               Refresh (false);
-                               return DateTime.FromFileTime (stat.LastAccessTime);
-                       }
-
-                       set {
-                               SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
-
-                               long filetime = value.ToFileTime ();
-
-                               MonoIOError error;
-                               
-                               if (!MonoIO.SetFileTime (FullName, -1,
-                                                        filetime, -1,
-                                                        out error))
-                                       throw MonoIO.GetException (FullName,
-                                                                  error);
-                               Refresh (true);
-                       }
-               }
-
-               [ComVisible(false)]
-               public DateTime LastAccessTimeUtc {
-                       get {
-                               Refresh (false);
-                               return LastAccessTime.ToUniversalTime ();
-                       }
-
-                       set {
-                               LastAccessTime = value.ToLocalTime ();
-                       }
-               }
-
-               public DateTime LastWriteTime {
-                       get {
-                               Refresh (false);
-                               return DateTime.FromFileTime (stat.LastWriteTime);
-                       }
-
-                       set {
-                               SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
-
-                               long filetime = value.ToFileTime ();
-
-                               MonoIOError error;
-                               
-                               if (!MonoIO.SetFileTime (FullName, -1, -1,
-                                                        filetime, out error))
-                                       throw MonoIO.GetException (FullName,
-                                                                  error);
-                               Refresh (true);
-                       }
-               }
-
-               [ComVisible(false)]
-               public DateTime LastWriteTimeUtc {
-                       get {
-                               Refresh (false);
-                               return LastWriteTime.ToUniversalTime ();
-                       }
-
-                       set {
-                               LastWriteTime = value.ToLocalTime ();
-                       }
-               }
-
-               // public methods
-
-               public abstract void Delete ();
-
-               public void Refresh ()
-               {
-                       Refresh (true);
-               }
-
-               // protected
-
-               protected FileSystemInfo ()
-               {
-                       this.valid = false;
-                       this.FullPath = null;
-               }
-
-               protected FileSystemInfo (SerializationInfo info, StreamingContext context)
-               {
-                       if (info == null)
-                       {
-                               throw new ArgumentNullException("info");
-                       }
-
-                       FullPath = info.GetString("FullPath");
-                       OriginalPath = info.GetString("OriginalPath");
-               }
-
-               protected string FullPath;
-               protected string OriginalPath;
-
-               // internal
-
-               internal void Refresh (bool force)
-               {
-                       if (valid && !force)
-                               return;
-
-                       MonoIOError error;
-                       
-                       MonoIO.GetFileStat (FullName, out stat, out error);
-                       /* Don't throw on error here, too much other
-                        * stuff relies on it not doing so...
-                        */
-                       
-                       valid = true;
-                       
-                       InternalRefresh ();
-               }
-               
-               internal virtual void InternalRefresh ()
-               {
-               }
-
-               internal void CheckPath (string path)
-               {
-                       if (path == null)
-                               throw new ArgumentNullException ("path");
-                       if (path.Length == 0)
-                               throw new ArgumentException ("An empty file name is not valid.");
-                       if (path.IndexOfAny (Path.InvalidPathChars) != -1)
-                               throw new ArgumentException ("Illegal characters in path.");
-                       if (Environment.IsRunningOnWindows) {
-                               int idx = path.IndexOf (':');
-                               if (idx >= 0 && idx != 1)
-                                       throw new ArgumentException ("path");
-                       }
-               }
-
-               internal MonoIOStat stat;
-               internal bool valid;
-       }
-}
index c84f4b705650e80b711389cb0e0ced183d7309d8..63756d190102372893732fd9e10aed7dabbf6526 100644 (file)
@@ -56,7 +56,9 @@ namespace System.IO
                ERROR_NO_MORE_FILES = 18,\r
        /*      ERROR_WRITE_PROTECT = 19,\r
                ERROR_BAD_UNIT = 20,\r
+       */\r
                ERROR_NOT_READY = 21,\r
+       /*\r
                ERROR_BAD_COMMAND = 22,\r
                ERROR_CRC = 23,\r
                ERROR_BAD_LENGTH = 24,\r
index a524b88ddd5fda1ac27e6cfb196b09c2f35307b1..c14420677ca909e8c5d5ff75cb0d0a2858979530 100644 (file)
@@ -1,11 +1,11 @@
-//\r
-// System.IO.MonoIOStat.cs: Idealized structure for file information.\r
-//\r
-// Author:\r
-//   Dan Lewis (dihlewis@yahoo.co.uk)\r
-//\r
-// (C) 2002\r
-//\r
+//
+// System.IO.MonoIOStat.cs: Idealized structure for file information.
+//
+// Author:
+//   Dan Lewis (dihlewis@yahoo.co.uk)
+//
+// (C) 2002
+//
 
 //
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-\r
-using System;\r
-\r
-namespace System.IO\r
-{\r
-       internal struct MonoIOStat {\r
-               public FileAttributes Attributes;\r
-               public long Length;\r
-               public long CreationTime;\r
-               public long LastAccessTime;\r
-               public long LastWriteTime;\r
-       }\r
-}\r
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace System.IO
+{
+       [StructLayout(LayoutKind.Sequential)]
+       internal struct MonoIOStat {
+               public FileAttributes fileAttributes;
+               public long Length;
+               public long CreationTime;
+               public long LastAccessTime;
+               public long LastWriteTime;
+       }
+}
index f053d51225e6e8a1db5babe82cd6507e70394c01..fc62a4db6e3bff42240dfdca7c37c83252c7e266 100644 (file)
@@ -289,6 +289,11 @@ namespace System.IO {
                        return fullpath;
                }
 
+               internal static String GetFullPathInternal(String path)
+               {
+                       return InsecureGetFullPath (path);
+               }
+
 #if !MOBILE
                // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx
                [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
@@ -871,5 +876,11 @@ namespace System.IO {
                                        throw new ArgumentException (parameterName);
                        }
                }
+
+               internal static string DirectorySeparatorCharAsString {
+                       get {
+                               return DirectorySeparatorStr;
+                       }
+               }
        }
 }
index 8c6f92469380cc742e69ea9bce4f9d2d8003ba3c..ef2180fed03d619ec3a383dbbc2a46d5c8cb5b69 100644 (file)
@@ -296,6 +296,12 @@ namespace System.Reflection {
                                throw new InvalidOperationException ("Late bound operations cannot be performed on fields with types for which Type.ContainsGenericParameters is true.");
            }
 
+#if MOBILE
+               static int get_core_clr_security_level ()
+               {
+                       return 1;
+               }
+#else
                //seclevel { transparent = 0, safe-critical = 1, critical = 2}
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern int get_core_clr_security_level ();
@@ -311,5 +317,6 @@ namespace System.Reflection {
                public override bool IsSecuritySafeCritical {
                        get { return get_core_clr_security_level () == 1; }
                }
+#endif
        }
 }
index 1c0e73c485f4aee2d3f7e35a2b67a4d6737f5d0f..04c0c5670863215cc7f35d8bec6d2db80fca9b72 100644 (file)
@@ -502,9 +502,16 @@ namespace System.Reflection {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
 
+#if MOBILE
+               static int get_core_clr_security_level ()
+               {
+                       return 1;
+               }
+#else
                //seclevel { transparent = 0, safe-critical = 1, critical = 2}
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern int get_core_clr_security_level ();
+#endif
 
                public override bool IsSecurityTransparent {
                        get { return get_core_clr_security_level () == 0; }
@@ -752,8 +759,15 @@ namespace System.Reflection {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
 
+#if MOBILE
+               static int get_core_clr_security_level ()
+               {
+                       return 1;
+               }
+#else
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern int get_core_clr_security_level ();
+#endif
 
                public override bool IsSecurityTransparent {
                        get { return get_core_clr_security_level () == 0; }
index db33ec75f0febdaa5cecfef8d4ce7b4975ba9cc8..f4ed7e249d1644f88a6690d5a2575cc024c96e97 100644 (file)
@@ -755,9 +755,9 @@ namespace MonoTests.System.IO
                                try {
                                        info.MoveTo (destFile);
                                        Assert.Fail ("#1");
-                               } catch (DirectoryNotFoundException ex) {
+                               } catch (FileNotFoundException ex) {
                                        // Could not find a part of the path
-                                       Assert.AreEqual (typeof (DirectoryNotFoundException), ex.GetType (), "#2");
+                                       Assert.AreEqual (typeof (FileNotFoundException), ex.GetType (), "#2");
                                        Assert.IsNull (ex.InnerException, "#3");
                                        Assert.IsNotNull (ex.Message, "#4");
                                }
index b7c1fd18db368ab5829fb39f4d834d7c78fac068..4229e3f8a1070ee43cf9b5aa0bb26bbeb1dbd41c 100644 (file)
@@ -195,13 +195,11 @@ System.IO/DriveType.cs
 System.IO/File.cs
 System.IO/FileAccess.cs
 System.IO/FileAttributes.cs
-System.IO/FileInfo.cs
 System.IO/FileMode.cs
 System.IO/FileOptions.cs
 System.IO/FileShare.cs
 System.IO/FileStream.cs
 System.IO/FileStreamAsyncResult.cs
-System.IO/FileSystemInfo.cs
 System.IO/HGlobalUnmanagedMemoryStream.cs
 System.IO/LogcatTextWriter.cs
 System.IO/MonoIO.cs
@@ -1000,7 +998,6 @@ ReferenceSources/SecurityContext.cs
 ../../../external/referencesource/mscorlib/system/int64.cs
 ../../../external/referencesource/mscorlib/system/iobservable.cs
 ../../../external/referencesource/mscorlib/system/iobserver.cs
-../../../external/referencesource/mscorlib/system/io/unmanagedmemoryaccessor.cs
 ../../../external/referencesource/mscorlib/system/iprogress.cs
 ../../../external/referencesource/mscorlib/system/iserviceobjectprovider.cs
 ../../../external/referencesource/mscorlib/system/invalidtimezoneexception.cs
@@ -1198,8 +1195,10 @@ ReferenceSources/SecurityContext.cs
 ../../../external/referencesource/mscorlib/system/io/drivenotfoundexception.cs
 ../../../external/referencesource/mscorlib/system/io/endofstreamexception.cs
 ../../../external/referencesource/mscorlib/system/io/ioexception.cs
+../../../external/referencesource/mscorlib/system/io/fileinfo.cs
 ../../../external/referencesource/mscorlib/system/io/fileloadexception.cs
 ../../../external/referencesource/mscorlib/system/io/filenotfoundexception.cs
+../../../external/referencesource/mscorlib/system/io/filesysteminfo.cs
 ../../../external/referencesource/mscorlib/system/io/memorystream.cs
 ../../../external/referencesource/mscorlib/system/io/pathtoolongexception.cs
 ../../../external/referencesource/mscorlib/system/io/pinnedbuffermemorystream.cs
@@ -1210,6 +1209,7 @@ ReferenceSources/SecurityContext.cs
 ../../../external/referencesource/mscorlib/system/io/stringwriter.cs
 ../../../external/referencesource/mscorlib/system/io/textreader.cs
 ../../../external/referencesource/mscorlib/system/io/textwriter.cs
+../../../external/referencesource/mscorlib/system/io/unmanagedmemoryaccessor.cs
 ../../../external/referencesource/mscorlib/system/io/unmanagedmemorystream.cs
 ../../../external/referencesource/mscorlib/system/io/unmanagedmemorystreamwrapper.cs
 
index e802a034dd64f2aa7f7a9a97dd76b0aaf3ed4294..6acc765c090d0c5e18bf7673c56328dbb30053a8 100644 (file)
@@ -3,21 +3,9 @@ CommonCrypto/CommonCrypto.cs
 CommonCrypto/CryptorTransform.cs
 CommonCrypto/FastCryptorTransform.cs
 CommonCrypto/CorlibExtras.cs
-CommonCrypto/MD5CryptoServiceProvider.g.cs
-CommonCrypto/SHA1CryptoServiceProvider.g.cs
-CommonCrypto/SHA1CryptoServiceProvider.g.cs
-CommonCrypto/SHA1Managed.g.cs
-CommonCrypto/SHA256Managed.g.cs
-CommonCrypto/SHA384Managed.g.cs
-CommonCrypto/SHA512Managed.g.cs
-CommonCrypto/TripleDESCryptoServiceProvider.g.cs
-CommonCrypto/DESCryptoServiceProvider.g.cs
-CommonCrypto/RC2CryptoServiceProvider.g.cs
 CommonCrypto/RijndaelManaged.cs
 CommonCrypto/SecRandom.cs
 CommonCrypto/RC4CommonCrypto.cs
-CommonCrypto/MD2Managed.g.cs
-CommonCrypto/MD4Managed.g.cs
 System/Environment.iOS.cs
 System/Guid.MonoTouch.cs
 System/NotSupportedException.iOS.cs
index e802a034dd64f2aa7f7a9a97dd76b0aaf3ed4294..6acc765c090d0c5e18bf7673c56328dbb30053a8 100644 (file)
@@ -3,21 +3,9 @@ CommonCrypto/CommonCrypto.cs
 CommonCrypto/CryptorTransform.cs
 CommonCrypto/FastCryptorTransform.cs
 CommonCrypto/CorlibExtras.cs
-CommonCrypto/MD5CryptoServiceProvider.g.cs
-CommonCrypto/SHA1CryptoServiceProvider.g.cs
-CommonCrypto/SHA1CryptoServiceProvider.g.cs
-CommonCrypto/SHA1Managed.g.cs
-CommonCrypto/SHA256Managed.g.cs
-CommonCrypto/SHA384Managed.g.cs
-CommonCrypto/SHA512Managed.g.cs
-CommonCrypto/TripleDESCryptoServiceProvider.g.cs
-CommonCrypto/DESCryptoServiceProvider.g.cs
-CommonCrypto/RC2CryptoServiceProvider.g.cs
 CommonCrypto/RijndaelManaged.cs
 CommonCrypto/SecRandom.cs
 CommonCrypto/RC4CommonCrypto.cs
-CommonCrypto/MD2Managed.g.cs
-CommonCrypto/MD4Managed.g.cs
 System/Environment.iOS.cs
 System/Guid.MonoTouch.cs
 System/NotSupportedException.iOS.cs
index 42a1b7aed46b97d1f3a2d3aa829ebd1ca1e69843..316dcc886cdcb804a8eb441fd5f26735fa95d8ef 100644 (file)
@@ -1,35 +1,34 @@
 <html>
 
 <head>
-<title>Microsoft Public License (Ms-PL)</title>
+<title>MIT License</title>
 </head>
 
 <body>
 
 <p><b>This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.</b></p>
 
-<h2>1. Definitions</h2>
-<p>The terms &#8220;reproduce,&#8221; &#8220;reproduction,&#8221; &#8220;derivative works,&#8221; and &#8220;distribution&#8221; have the same meaning here as under U.S. copyright law.</p>
-<p>A &#8220;contribution&#8221; is the original software, or any additions or changes to the software.</p>
-<p>A &#8220;contributor&#8221; is any person that distributes its contribution under this license.</p>
-<p> &#8220;Licensed patents&#8221; are a contributor&#8217;s patent claims that read directly on its contribution.</p>
-<h2>2. Grant of Rights</h2>
-<p>(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright 
-license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.</p>
-
-<p>(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, 
-royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative 
-works of the contribution in the software.</p>
-
-<h2>3. Conditions and Limitations</h2><p>(A) No Trademark License- This license does not grant you rights to use any contributors&#8217; name, logo, or trademarks.</p>
-<p>(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.</p>
-<p>(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.</p>
-<p>(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. 
-If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.</p>
-
-<p>(E) The software is licensed &#8220;as-is.&#8221; You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional 
-consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, 
-fitness for a particular purpose and non-infringement.</p>
+<pre>
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+</pre>
 
 </body>
 
index b623377bd0e04a8c6d93e9a17150f8e52601ec56..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,177 +0,0 @@
-{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset1\fprq2{\*\panose 02040503050406030204}Cambria Math;}
-{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
-{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
-{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
-{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
-{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
-{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
-{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
-{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
-{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
-{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
-{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
-{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
-{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
-{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
-{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
-{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
-{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
-{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
-{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
-{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
-{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
-{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
-{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
-{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
-{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
-{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
-\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
-\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 
-\ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
-\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
-\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 
-\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\rsidtbl \rsid11612883}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author dinov}{\operator dinov}
-{\creatim\yr2007\mo10\dy30\hr14\min43}{\revtim\yr2007\mo10\dy30\hr14\min43}{\version2}{\edmins1}{\nofpages2}{\nofwords404}{\nofchars2212}{\*\company Microsoft}{\nofcharsws2611}{\vern32893}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/200
-3/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect 
-\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701
-\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot11612883 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
-\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang 
-{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\sb100\sa100\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 
-\fs22\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af0\afs28 \ltrch\fcs0 \b\f0\fs28\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 Microsoft }{\rtlch\fcs1 \ab\af0\afs28 \ltrch\fcs0 
-\b\f0\fs28\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 Public }{\rtlch\fcs1 \ab\af0\afs28 \ltrch\fcs0 \b\f0\fs28\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 License (Ms-PL)
-\par }{\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 
-This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid11612883 
-\par }{\rtlch\fcs1 \ab\af0\afs36 \ltrch\fcs0 \b\f0\fs36\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 1. Definitions
-\par }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 \hich\f0 The terms \'93\loch\f0 \hich\f0 reproduce,\'94\loch\f0 \hich\f0  \'93\loch\f0 \hich\f0 reproduction,\'94\loch\f0 \hich\f0  \'93
-\hich\af0\dbch\af31505\loch\f0 \hich\f0 derivative works,\'94\loch\f0 \hich\f0  and \'93\loch\f0 \hich\f0 distribution\'94\loch\f0  have the same meaning here as under U.S. copyright law.
-\par \hich\af0\dbch\af31505\loch\f0 \hich\f0 A \'93\loch\f0 \hich\f0 contribution\'94\loch\f0  is the original software, or any additions or changes to the software.
-\par \hich\af0\dbch\af31505\loch\f0 \hich\f0 A \'93\loch\f0 \hich\f0 contributor\'94\loch\f0  is any person that distributes its contribution under this\hich\af0\dbch\af31505\loch\f0  license.
-\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Licensed patents\'94\loch\f0  are a contributor\hich\f0 \rquote \loch\f0 s patent claims that read directly on its contribution.
-\par }{\rtlch\fcs1 \ab\af0\afs36 \ltrch\fcs0 \b\f0\fs36\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 2. Grant of Rights
-\par }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contrib
-\hich\af0\dbch\af31505\loch\f0 utor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
-
-\par \hich\af0\dbch\af31505\loch\f0 (B) Patent Grant- Subject to th\hich\af0\dbch\af31505\loch\f0 
-e terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or o
-\hich\af0\dbch\af31505\loch\f0 t\hich\af0\dbch\af31505\loch\f0 herwise dispose of its contribution in the software or derivative works of the contribution in the software.
-\par }{\rtlch\fcs1 \ab\af0\afs36 \ltrch\fcs0 \b\f0\fs36\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 3. Conditions and Limitations
-\par }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid11612883 \hich\af0\dbch\af31505\loch\f0 (A) No Trademark License- This license does not grant you rights to use any contributors\hich\f0 \rquote \loch\f0  name, logo, or trademarks.
-\par \hich\af0\dbch\af31505\loch\f0 (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
-\par \hich\af0\dbch\af31505\loch\f0 (C) If you distribute any portion of the software, you must ret\hich\af0\dbch\af31505\loch\f0 ain all copyright, patent, trademark, and attribution notices that are present in the software.
-\par \hich\af0\dbch\af31505\loch\f0 (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with y\hich\af0\dbch\af31505\loch\f0 
-our distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
-\par \hich\af0\dbch\af31505\loch\f0 \hich\f0 (E) The software is licensed \'93\loch\f0 \hich\f0 as-is.\'94\loch\f0  You bear the risk of using it. The contributors give \hich\af0\dbch\af31505\loch\f0 
-no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantabil
-\hich\af0\dbch\af31505\loch\f0 i\hich\af0\dbch\af31505\loch\f0 ty, fitness for a particular purpose and non-infringement.
-\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid11612883 
-\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
-72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
-2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
-44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7
-065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000
-00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08
-84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc
-52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353
-bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468
-656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c
-070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7
-29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65
-312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8
-a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04
-98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c
-94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471
-7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671
-9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1
-e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5
-193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1
-17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2
-8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6
-6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a
-668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847
-bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e
-16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b
-5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0
-8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2
-c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966
-0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b
-7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb
-9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0
-088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf
-8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26
-ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0
-28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6
-345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93
-b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30
-254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74
-68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24
-51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198
-720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528
-a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000
-000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000
-002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468
-656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000
-00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000
-00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000}
-{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
-617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
-6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
-656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
-{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
-\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
-\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
-\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
-\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
-\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
-\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
-\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
-\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
-\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
-\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
-4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000
-d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000009055
-58f93d1bc801feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000105000000000000}}
\ No newline at end of file
index 0e99e810203cb39600c34ab5c6d2fc6c67ae4b35..74e61e3541c895af113ea346790d598269aa3ff8 100644 (file)
@@ -527,6 +527,7 @@ namespace Mono.Linker.Steps {
                        if (type.HasMethods) {
                                MarkMethodsIf (type.Methods, IsVirtualAndHasPreservedParent);
                                MarkMethodsIf (type.Methods, IsStaticConstructorPredicate);
+                               MarkMethodsIf (type.Methods, HasSerializationAttribute);
                        }
 
                        DoAdditionalTypeProcessing (type);
@@ -740,6 +741,25 @@ namespace Mono.Linker.Steps {
                        return method.IsConstructor && method.IsStatic;
                }
 
+               static bool HasSerializationAttribute (MethodDefinition method)
+               {
+                       if (!method.HasCustomAttributes)
+                               return false;
+                       foreach (var ca in method.CustomAttributes) {
+                               var cat = ca.AttributeType;
+                               if (cat.Namespace != "System.Runtime.Serialization")
+                                       continue;
+                               switch (cat.Name) {
+                               case "OnDeserializedAttribute":
+                               case "OnDeserializingAttribute":
+                               case "OnSerializedAttribute":
+                               case "OnSerializingAttribute":
+                                       return true;
+                               }
+                       }
+                       return false;
+               }
+
                static bool IsSerializable (TypeDefinition td)
                {
                        return (td.Attributes & TypeAttributes.Serializable) != 0;
index 3871ee4b0c102ae1081e37bc15e33682915cf21a..9ab8f7dd6d674aa778d9a9f89a871ec77d1381bb 100644 (file)
@@ -828,7 +828,9 @@ static
 void
 mono_gc_init_finalizer_thread (void)
 {
-       gc_thread = mono_thread_create_internal (mono_domain_get (), finalizer_thread, NULL, FALSE, 0);
+       MonoError error;
+       gc_thread = mono_thread_create_internal (mono_domain_get (), finalizer_thread, NULL, FALSE, 0, &error);
+       mono_error_assert_ok (&error);
 }
 
 void
index 507e18becc97c3c90e66863ca7eec16026a96f1e..285905fb9b8b8369f009526ea213975274c8ff3c 100644 (file)
@@ -3486,7 +3486,8 @@ write_enum_value (char *mem, int type, guint64 value)
                break;
        }
        case MONO_TYPE_U2:
-       case MONO_TYPE_I2: {
+       case MONO_TYPE_I2:
+       case MONO_TYPE_CHAR: {
                guint16 *p = (guint16 *)mem;
                *p = value;
                break;
index 74268ac9c1cc22d44bb1aaa1bc7ffb85552014c8..cc73d75896fe1a4d77b172366922ee2f01ee47e3 100644 (file)
@@ -4475,7 +4475,9 @@ mono_runtime_exec_managed_code (MonoDomain *domain,
                                MonoMainThreadFunc main_func,
                                gpointer main_args)
 {
-       mono_thread_create (domain, main_func, main_args);
+       MonoError error;
+       mono_thread_create_checked (domain, main_func, main_args, &error);
+       mono_error_assert_ok (&error);
 
        mono_thread_manage ();
 }
index 2851c7547b8b859f8b296c56cba264bf842ca4c7..7aa39b2b4a5b2a435dd301663859c08e2111b3dc 100644 (file)
@@ -536,8 +536,9 @@ initialize (void)
        if (!threadpool_io->backend.init (threadpool_io->wakeup_pipes [0]))
                g_error ("initialize: backend->init () failed");
 
-       if (!mono_thread_create_internal (mono_get_root_domain (), selector_thread, NULL, TRUE, SMALL_STACK))
-               g_error ("initialize: mono_thread_create_internal () failed");
+       MonoError error;
+       if (!mono_thread_create_internal (mono_get_root_domain (), selector_thread, NULL, TRUE, SMALL_STACK, &error))
+               g_error ("initialize: mono_thread_create_internal () failed due to %s", mono_error_get_message (&error));
 }
 
 static void
index abcc9fd747942fd34b85f58442c804c449119d9a..6151395688005d2ba455d7684bfec5f3bdb67d8c 100644 (file)
@@ -742,7 +742,8 @@ worker_try_create (void)
                counter._.active ++;
        });
 
-       if ((thread = mono_thread_create_internal (mono_get_root_domain (), worker_thread, NULL, TRUE, 0)) != NULL) {
+       MonoError error;
+       if ((thread = mono_thread_create_internal (mono_get_root_domain (), worker_thread, NULL, TRUE, 0, &error)) != NULL) {
                threadpool->worker_creation_current_count += 1;
 
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] try create worker, created %p, now = %d count = %d", mono_native_thread_id_get (), thread->tid, now, threadpool->worker_creation_current_count);
@@ -750,7 +751,8 @@ worker_try_create (void)
                return TRUE;
        }
 
-       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] try create worker, failed: could not create thread", mono_native_thread_id_get ());
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] try create worker, failed: could not create thread due to %s", mono_native_thread_id_get (), mono_error_get_message (&error));
+       mono_error_cleanup (&error);
 
        COUNTER_ATOMIC (counter, {
                counter._.working --;
@@ -965,6 +967,7 @@ monitor_thread (void)
 static void
 monitor_ensure_running (void)
 {
+       MonoError error;
        for (;;) {
                switch (monitor_status) {
                case MONITOR_STATUS_REQUESTED:
@@ -976,8 +979,10 @@ monitor_ensure_running (void)
                        if (mono_runtime_is_shutting_down ())
                                return;
                        if (InterlockedCompareExchange (&monitor_status, MONITOR_STATUS_REQUESTED, MONITOR_STATUS_NOT_RUNNING) == MONITOR_STATUS_NOT_RUNNING) {
-                               if (!mono_thread_create_internal (mono_get_root_domain (), monitor_thread, NULL, TRUE, SMALL_STACK))
+                               if (!mono_thread_create_internal (mono_get_root_domain (), monitor_thread, NULL, TRUE, SMALL_STACK, &error)) {
                                        monitor_status = MONITOR_STATUS_NOT_RUNNING;
+                                       mono_error_cleanup (&error);
+                               }
                                return;
                        }
                        break;
index 7e740b72b53dfadb97736debbc8ef1807e1c87f7..23a7eefcd771587febe75cf6b7903b401b4aac23 100644 (file)
@@ -65,7 +65,7 @@ typedef void (*MonoThreadCleanupFunc) (MonoNativeThreadId tid);
 /* INFO has type MonoThreadInfo* */
 typedef void (*MonoThreadNotifyPendingExcFunc) (gpointer info);
 
-MonoInternalThread* mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gboolean threadpool_thread, guint32 stack_size);
+MonoInternalThread* mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gboolean threadpool_thread, guint32 stack_size, MonoError *error);
 
 void mono_threads_install_cleanup (MonoThreadCleanupFunc func);
 
@@ -245,6 +245,9 @@ gpointer mono_get_special_static_data_for_thread (MonoInternalThread *thread, gu
 MonoException* mono_thread_resume_interruption (void);
 void mono_threads_perform_thread_dump (void);
 
+gboolean
+mono_thread_create_checked (MonoDomain *domain, gpointer func, gpointer arg, MonoError *error);
+
 MonoThread *
 mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *error);
 
index a7fd6491a226ccac6081cceea0fb6a313d510890..b842edbc08f4aef1eabe5deeb5be0f5d93ce4fce 100644 (file)
@@ -915,19 +915,20 @@ guint32 mono_threads_get_default_stacksize (void)
  *   ARG should not be a GC reference.
  */
 MonoInternalThread*
-mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gboolean threadpool_thread, guint32 stack_size)
+mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gboolean threadpool_thread, guint32 stack_size, MonoError *error)
 {
-       MonoError error;
        MonoThread *thread;
        MonoInternalThread *internal;
        StartInfo *start_info;
        gboolean res;
 
-       thread = create_thread_object (domain, &error);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       mono_error_init (error);
 
-       internal = create_internal_thread (&error);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       thread = create_thread_object (domain, error);
+       return_val_if_nok (error, NULL);
+
+       internal = create_internal_thread (error);
+       return_val_if_nok (error, NULL);
 
        MONO_OBJECT_SETREF (thread, internal_thread, internal);
 
@@ -936,11 +937,8 @@ mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gb
        start_info->obj = thread;
        start_info->start_arg = arg;
 
-       res = create_thread (thread, internal, start_info, threadpool_thread, stack_size, &error);
-       if (!res) {
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
-               return NULL;
-       }
+       res = create_thread (thread, internal, start_info, threadpool_thread, stack_size, error);
+       return_val_if_nok (error, NULL);
 
        /* Check that the managed and unmanaged layout of MonoInternalThread matches */
 #ifndef MONO_CROSS_COMPILE
@@ -954,7 +952,15 @@ mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gb
 void
 mono_thread_create (MonoDomain *domain, gpointer func, gpointer arg)
 {
-       mono_thread_create_internal (domain, func, arg, FALSE, 0);
+       MonoError error;
+       if (!mono_thread_create_checked (domain, func, arg, &error))
+               mono_error_cleanup (&error);
+}
+
+gboolean
+mono_thread_create_checked (MonoDomain *domain, gpointer func, gpointer arg, MonoError *error)
+{
+       return (NULL != mono_thread_create_internal (domain, func, arg, FALSE, 0, error));
 }
 
 MonoThread *
index 99762e9da005e13e94897fe763dfe67f00c83341..5a0c79c7cca732b1ffeff80292a6ad943d1114e5 100644 (file)
@@ -34,7 +34,10 @@ extern MONO_API void mono_thread_stop (MonoThread *thread);
 
 extern MONO_API void mono_thread_new_init (intptr_t tid, void* stack_start,
                                  void* func);
-extern MONO_API void mono_thread_create (MonoDomain *domain, void* func, void* arg);
+
+extern MONO_RT_EXTERNAL_ONLY MONO_API void
+mono_thread_create (MonoDomain *domain, void* func, void* arg);
+
 extern MONO_API MonoThread *mono_thread_attach (MonoDomain *domain);
 extern MONO_API void mono_thread_detach (MonoThread *thread);
 extern MONO_API void mono_thread_exit (void);
index 5e6e71e26adecaf495bf6e37ae05a5477906aea2..a955b44643373c24d61f2f2bb63f9fd2a49e1529 100644 (file)
@@ -851,6 +851,7 @@ small_id_thread_func (gpointer arg)
 static void
 jit_info_table_test (MonoDomain *domain)
 {
+       MonoError error;
        int i;
 
        g_print ("testing jit_info_table\n");
@@ -879,8 +880,10 @@ jit_info_table_test (MonoDomain *domain)
        sleep (2);
        */
 
-       for (i = 0; i < num_threads; ++i)
-               mono_thread_create (domain, test_thread_func, &thread_datas [i]);
+       for (i = 0; i < num_threads; ++i) {
+               mono_thread_create_checked (domain, test_thread_func, &thread_datas [i], &error);
+               mono_error_assert_ok (&error);
+       }
 }
 #endif
 
@@ -973,6 +976,7 @@ compile_all_methods_thread_main (CompileAllThreadArgs *args)
 static void
 compile_all_methods (MonoAssembly *ass, int verbose, guint32 opts, guint32 recompilation_times)
 {
+       MonoError error;
        CompileAllThreadArgs args;
 
        args.ass = ass;
@@ -984,7 +988,8 @@ compile_all_methods (MonoAssembly *ass, int verbose, guint32 opts, guint32 recom
         * Need to create a mono thread since compilation might trigger
         * running of managed code.
         */
-       mono_thread_create (mono_domain_get (), compile_all_methods_thread_main, &args);
+       mono_thread_create_checked (mono_domain_get (), compile_all_methods_thread_main, &args, &error);
+       mono_error_assert_ok (&error);
 
        mono_thread_manage ();
 }
index 1be75933c8efa6041ac798234d72967e4c8f6b8d..675dcf6d3deedd2e75fcbecd46c6c1c708d88eec 100644 (file)
@@ -439,6 +439,22 @@ mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot)
        return buf;
 }
 
+#else
+
+gpointer
+mono_arch_get_gsharedvt_arg_trampoline (MonoDomain *domain, gpointer arg, gpointer addr)
+{
+       g_assert_not_reached ();
+       return NULL;
+}
+
+gpointer
+mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot)
+{
+       g_assert_not_reached ();
+       return NULL;
+}
+
 #endif
 
 #else