public static bool TryReadLine(string line, out TemplateDeclaration declaration) { if (IsDeclaration(line)) { string[] data = GetDeclarationContents(line).Split(DeclarationSplit, 2); if (data.Length == 2) { TemplateDeclarationType type = GetDeclarationType(data[0]); declaration = new TemplateDeclaration(type, data[1]); return(type != TemplateDeclarationType.Invalid); } } declaration = Default; return(false); }
private TemplateDeclaration(TemplateDeclarationType type, string name) { this.Type = type; this.Name = name; }