private static string GetAttribute(DataObject dataObject, string attributeName) { try { return dataObject.GetProperty(attributeName).GetValueAsString(); } catch (PropertyNotFoundException ex) { Log.Warning(ex.Message); return null; } }
private DishonourLetter GetLetterFromDataObject(DataObject dataObject, DateTime processingDate) { var name = dataObject.GetProperty(DocumentumAttributes.ObjectName).GetValueAsString(); var status = dataObject.GetProperty(DishonourLetterAttributes.DishonourStatus).GetValueAsString(); return new DishonourLetter(name, DishonourLetterStatus.FromValue(status), processingDate); }