All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Net.5.0.Rosetta.Validation.ValidationInterfaces.cs Maven / Gradle / Ivy

#nullable enable // Allow nullable reference types

namespace Rosetta.Lib.Validation
{
    using System;

    public interface IValidator where T : IRosettaModelObject
    {
        IValidationResult Validate(T obj);
    }

    public interface IValidatorWithArg where T1 : IRosettaModelObject
    {
        IValidationResult Validate(T1 obj, T2 field);
    }

    public enum ValidationType
    {
        DATA_RULE, CHOICE_RULE, MODEL_INSTANCE, ONLY_EXISTS, POST_PROCESS_EXCEPTION
    }

    public interface IValidationResult
    {
        bool IsSuccess { get; }

        string ModelObjectName { get; }

        string Name { get; }

        ValidationType ValidationType { get; }

        string Definition { get; }

        string? FailureReason { get; }

        //RosettaPath Path { get; }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy