public File GetCodeBehindFile(string name) { if (!HasCodeBehindFile(name)) { throw new ArgumentException("Code Behind File doesn't exist"); } return(CodeBehindFiles.Single(f => f.Name == name)); }
public bool HasCodeBehindFile(string name) { return(CodeBehindFiles.Any(f => f.Name == name)); }