/// <summary> /// Uses custom FileApi implementation to apply a label to a stream or file. /// Writes result to an output stream. /// </summary> /// <param name="inputStream"></param> /// <param name="fileName"></param> /// <param name="labelId"></param> /// <param name="outputStream"></param> /// <returns></returns> public bool ApplyLabel(Stream inputStream, string fileName, string labelId, Stream outputStream) { try { // Provide a stream and filename. Filename is used to generate audit events. var result = _fileApi.ApplyLabel(inputStream, outputStream, fileName, labelId, ""); if (!result) { throw new Exception("Failed To Apply Label"); } return(result); } catch (Exception ex) { throw ex; } }