Alba.Jaml.MSInternal.XamlQualifiedName.Parse C# (CSharp) Method

Parse() public static method

public static Parse ( string longName, string &prefix, string &name ) : bool
longName string
prefix string
name string
return bool
        public static bool Parse (string longName, out string prefix, out string name)
        {
            int startIndex = 0;
            int index = longName.IndexOf(':');
            prefix = string.Empty;
            name = string.Empty;
            if (index != -1) {
                prefix = longName.Substring(startIndex, index);
                if (string.IsNullOrEmpty(prefix) || !IsNameValid(prefix)) {
                    return false;
                }
                startIndex = index + 1;
            }
            name = (startIndex == 0) ? longName : longName.Substring(startIndex);
            return (!string.IsNullOrEmpty(name) && IsNameValid_WithPlus(name));
        }