﻿namespace EmailRegistry.Infrastructure.BusinessLogic.Validation.Strategies
{
    [ValidationStrategy("NotNull")]
    public class NotNullValidationStrategy : IValidationStrategy
    {
        public ValidationOperationResult Validate(object obj)
        {
            return obj == null
                ? new ValidationOperationResult(new[] { "The object should not be null." })
                : new ValidationOperationResult();
        }
    }
}