public static bool IsLegal(string filler) { bool flag = true; if (!filler.StartsWith("whinfcomp:", StringComparison.Ordinal)) { return(false); } int index = filler.IndexOf(":", StringComparison.Ordinal); if (index < size_ - 1) { return(false); } string interpretation = filler.Substring(index + 1); if (!CheckInterpretation.IsLegal(interpretation)) { return(false); } return(flag); }
private static bool CheckArgument(string argument) { bool flag = false; if (argument_.Contains(argument) == true) { flag = true; } else if ((argument.StartsWith("binfcomp:", StringComparison.Ordinal) == true) || (argument.StartsWith("edcomp:", StringComparison.Ordinal) == true) || (argument.StartsWith("infcomp:", StringComparison.Ordinal) == true) || (argument.StartsWith("ingcomp:", StringComparison.Ordinal) == true) || (argument.StartsWith("whinfcomp:", StringComparison.Ordinal) == true)) { int index = argument.IndexOf(":", StringComparison.Ordinal); string interpretation = argument.Substring(index + 1); flag = CheckInterpretation.IsLegal(interpretation); } else if ((argument.StartsWith("np|", StringComparison.Ordinal) == true) && (argument.EndsWith("|", StringComparison.Ordinal) == true) && (!argument.Equals("np|"))) { flag = argument.IndexOf("|", StringComparison.Ordinal) + 1 != argument.LastIndexOf("|", StringComparison.Ordinal); } return(flag); }