BlinkSyncTests.MainTest.StripMetadataFromFilename C# (CSharp) Method

StripMetadataFromFilename() private static method

Removes metadata from test case filename and returns the metadata
private static StripMetadataFromFilename ( string fileName, bool &isHidden, bool &isCopy ) : string
fileName string
isHidden bool
isCopy bool
return string
        private static string StripMetadataFromFilename(string fileName, out bool isHidden, out bool isCopy)
        {
            isHidden = false;
            isCopy = false;
            if (fileName[0] != '*')
            {
                return fileName;
            }

            int pos = 1;
            char c;
            while ((c = fileName[pos]) != '|')
            {
                if (c == 'h')
                {
                    isHidden = true;
                }
                else if (c == 'c')
                {
                    isCopy = true;
                }
                else
                {
                    throw new Exception(String.Format("Unknown test file metadata '{0}'", c));
                }
                pos++;
            }

            return fileName.Remove(0, pos + 1);
        }