OperationItem IAlarmWorkflowService.GetOperationById(string operationId, string detailLevel) { int rDetailLevel = 0; int rOperationId = -1; if (!int.TryParse(operationId, out rOperationId)) { // Invalid case return(null); } int.TryParse(detailLevel, out rDetailLevel); Operation operation = _operationStore.GetOperationById(rOperationId); if (operation == null) { return(null); } OperationItemDetailLevel detail = OperationItemDetailLevel.Minimum; if (rDetailLevel >= 0 && rDetailLevel <= 1) { detail = (OperationItemDetailLevel)rDetailLevel; } return(new OperationItem(operation, detail)); }
OperationItem IAlarmWorkflowServiceInternal.GetOperationById(int operationId, OperationItemDetailLevel detailLevel) { Operation operation = _operationStore.GetOperationById(operationId); if (operation == null) { return(null); } return(new OperationItem(operation, detailLevel)); }