Remove commented-out code.
authorStephen A. Imhoff <clockwork-muse@outlook.com>
Wed, 26 Oct 2016 18:06:34 +0000 (11:06 -0700)
committerStephen A. Imhoff <clockwork-muse@outlook.com>
Fri, 28 Oct 2016 04:46:56 +0000 (21:46 -0700)
src/mscorlib/src/System/Globalization/IdnMapping.cs

index 556841e..edae8ee 100644 (file)
@@ -133,62 +133,6 @@ namespace System.Globalization
         public String GetAscii(String unicode, int index, int count)
         {
             throw null;
-            /*if (unicode==null) throw new ArgumentNullException(nameof(unicode));
-            if (index < 0 || count < 0)
-                throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count",
-                      Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum"));
-            if (index > unicode.Length)
-                throw new ArgumentOutOfRangeException("byteIndex",
-                    Environment.GetResourceString("ArgumentOutOfRange_Index"));
-            if (index > unicode.Length - count)
-                throw new ArgumentOutOfRangeException("unicode",
-                      Environment.GetResourceString("ArgumentOutOfRange_IndexCountBuffer"));
-            Contract.EndContractBlock();
-
-            // We're only using part of the string
-            unicode = unicode.Substring(index, count);
-
-            if (Environment.IsWindows8OrAbove)
-            {
-                return GetAsciiUsingOS(unicode);
-            }
-
-            // Check for ASCII only string, which will be unchanged
-            if (ValidateStd3AndAscii(unicode, UseStd3AsciiRules, true))
-            {
-                return unicode;
-            }
-
-            // Cannot be null terminated (normalization won't help us with this one, and
-            // may have returned false before checking the whole string above)
-            Contract.Assert(unicode.Length >= 1, "[IdnMapping.GetAscii]Expected 0 length strings to fail before now.");
-            if (unicode[unicode.Length - 1] <= 0x1f)
-            {
-                throw new ArgumentException(
-                    Environment.GetResourceString("Argument_InvalidCharSequence", unicode.Length-1 ),
-                    "unicode");
-            }
-
-            // Have to correctly IDNA normalize the string and Unassigned flags
-            bool bHasLastDot = (unicode.Length > 0) && IsDot(unicode[unicode.Length - 1]);
-            unicode = unicode.Normalize((NormalizationForm)(m_bAllowUnassigned ?
-                ExtendedNormalizationForms.FormIdna : ExtendedNormalizationForms.FormIdnaDisallowUnassigned));
-
-            // Make sure we didn't normalize away something after a last dot
-            if ((!bHasLastDot) && unicode.Length > 0 && IsDot(unicode[unicode.Length - 1]))
-            {
-                throw new ArgumentException(Environment.GetResourceString(
-                    "Argument_IdnBadLabelSize"), "unicode");
-            }
-
-            // May need to check Std3 rules again for non-ascii
-            if (UseStd3AsciiRules)
-            {
-                ValidateStd3AndAscii(unicode, true, false);
-            }
-
-            // Go ahead and encode it
-            return punycode_encode(unicode);*/
         }