System.Data.XSDSchema.IsXsdType C# (CSharp) Method

IsXsdType() static private method

static private IsXsdType ( string name ) : bool
name string
return bool
        internal static bool IsXsdType(string name)
        {
#if DEBUG
            for (int i = 1; i < s_mapNameTypeXsd.Length; ++i)
            {
                Debug.Assert((s_mapNameTypeXsd[i - 1].CompareTo(s_mapNameTypeXsd[i].name)) < 0, "incorrect sorting " + s_mapNameTypeXsd[i].name);
            }
#endif
            int index = Array.BinarySearch(s_mapNameTypeXsd, name);
            if (index < 0)
            {
#if DEBUG
                // Let's check that we realy don't have this name:
                foreach (NameType nt in s_mapNameTypeXsd)
                {
                    Debug.Assert(nt.name != name, "FindNameType('" + name + "') -- failed. Existed name not found");
                }
#endif
                return false;
            }
            Debug.Assert(s_mapNameTypeXsd[index].name == name, "FindNameType('" + name + "') -- failed. Wrong name found");
            return true;
        }