Вариант 1
Код: Выделить всё
public IEnumerable Foo(int userId, out videoId)
{
var validationResults = new List();
// Validation logic goes here...
videoId = _videoService.AddVideo();
return validationResults;
}
Код: Выделить всё
public ServiceResult Foo(int userId)
{
var validationResults = new List();
var serviceResult = new ServiceResult();
// Validation logic goes here...
serviceResult.ReturnObject = _videoService.AddVideo();
serviceResult.ValidationResults = validationResults;
return serviceResult;
}
public class ServiceResult
{
public IEnumerable ValidationResults { get; set; }
public object ReturnObject { get; set; }
}
Подробнее здесь: https://stackoverflow.com/questions/158 ... al-results