Exemplo n.º 1
0
        public Flow(Guid owner, EOwnerType ownerType, Guid objectId, string path)
        {
            Owner     = owner;
            OwnerType = ownerType;
            Object    = objectId;
            Path      = path;

            CreationDate = DateTime.Now;

            ValidationContract contract = new ValidationContract();

            contract.IsNotNull(Owner, "Owner", "Value is Invalid");

            contract.IsNotNull(OwnerType, "OwnerType", "Value is Invalid");

            contract.IsNotNull(Object, "Object", "Value is Invalid");

            if (contract.IsNotNullOrEmpty(Path, "Path", "Value is Invalid").Valid)
            {
                contract.HasMinLen(Path, 3, "Path", "Is too short")
                .HasMaxLen(Path, 800, "Path", "Is too long");
            }

            AddNotifications(contract);
        }
Exemplo n.º 2
0
 public GetFlowCommandResult(int code, Guid owner, EOwnerType ownerType, Guid objectId, DateTime creationDate, string path)
 {
     Code         = code;
     Owner        = owner;
     OwnerType    = ownerType;
     Object       = objectId;
     CreationDate = creationDate;
     Path         = path;
 }