using System;
using System.IO;
using EllieMae.Encompass.Client;
using EllieMae.Encompass.BusinessObjects;
using EllieMae.Encompass.BusinessObjects.Loans;
class ContactManager
{
public static void Main(string[] args)
{
// Open the session to the remote server
Session session = new Session();
session.StartOffline(“mary”, “maryspwd”);
// Open the loan using the GUID specified on the command line
Loan loan = session.Loans.Open(args[0]);
// Iterate over the list of attachments, saving them to the C:\Temp folder
foreach (Attachment att in loan.Attachments)
att.SaveToDisk(“C:\\Temp\\” + att.Name);
// Close the loan, discarding all of our changes
loan.Close();
// End the session to gracefully disconnect from the server
session.End();
}
}