public bool AddFile(Credentials c, MachineContents m, DirectoryContents d, FileContents f) { var cl = new Ref.FileSyncModelClient(); try { bool result = false; result = cl.AddFile(c, m, d, f); cl.Close(); return(result); } catch (Exception ex) { cl.Abort(); throw new ActionException("Error occurred while file was uploaded.", ActionType.File, MemeType.Fuuuuu, ex); } }