public IAsyncCollector <Models.Assignment> Convert(AssignmentAttribute attribute) { string baseServiceUriString = Environment.GetEnvironmentVariable(attribute.ServiceUrlEnvironmentVariable); if (string.IsNullOrEmpty(baseServiceUriString)) { throw new ArgumentException("Assignment service URL was not provided."); } AssignmentsClient assignmentsClient = _assignmentClientFactory.CreateClient(baseServiceUriString); return(new AssignmentsCollector(assignmentsClient)); }
private Task <Models.Assignment> ConvertToAssignment(AssignmentAttribute attribute, ValueBindingContext context) { string baseServiceUriString = Environment.GetEnvironmentVariable(attribute.ServiceUrlEnvironmentVariable); if (string.IsNullOrEmpty(baseServiceUriString)) { throw new ArgumentException("Assignment service URL was not provided."); } AssignmentsClient assignmentsClient = _assignmentClientFactory.CreateClient(baseServiceUriString); return(assignmentsClient.GetAssignment(attribute.AssignmentId)); }
private AvailableTask Build(AssignmentAttribute attribute) { TenroxTask task = new TenroxTask(attribute.AssignmentName, attribute.AssignmentUid); TenroxClient client = new TenroxClient(attribute.ClientName, attribute.ClientUid); return new AvailableTask(task, client); }
public AvailableTaskBuilder(AssignmentAttribute[] timesheetAssignmentAttributes) { if (timesheetAssignmentAttributes == null) throw new ArgumentNullException("timesheetAssignmentAttributes"); _timesheetAssignmentAttributes = timesheetAssignmentAttributes; }