private static void AddDocument(Document doc, string[] attributes)
{
foreach (var attribute in attributes)
{
var tokens = attribute.Split('=');
var propName = tokens[0];
var propValue = tokens[1];
doc.LoadProperty(propName, propValue);
}
if (doc.Name != null)
{
documents.Add(doc);
Console.WriteLine("Document added: {0}", doc.Name);
}
else
{
Console.WriteLine("Document has no name");
}
}