Esempio n. 1
0
 private void updateVariableField(ValueObjectBase var)
 {
     if (var.WasSet)
     {
         updateField(var.Name, var.Value);
     }
 }
Esempio n. 2
0
        private string getVariableDecl(ValueObjectBase input)
        {
            string typeStr = getTypeString(input.PortType);
            string initStr = input.HasValue ? getInitString(input.PortType, input.Value) : "";

            input.WasSet = false; // Value has been used
            return(typeStr + " " + input.Name + initStr + "; ");
        }
Esempio n. 3
0
        private string getVariableDeclarations(ValueObjectBase input)
        {
            string typeStr = getTypeString(input.PortType);

            System.Diagnostics.Trace.Assert(input.HasValue);
            string valueInitStr = getInitString(input.PortType, input.Value);
            string varDecls     =
                typeStr + " " + createVariableIdentifier(input.Name) + valueInitStr + "; " +
                "bool " + createIsVariableValueSetIdentifier(input.Name) + "; ";

            return(varDecls);
        }
Esempio n. 4
0
 private void updateVariableFields(ValueObjectBase var)
 {
     if (var.WasSet)
     {
         System.Diagnostics.Trace.Assert(var.Value != null);
         updateField(createVariableIdentifier(var.Name), var.Value);
         // Indicate that this input has just received a value
         updateField(createIsVariableValueSetIdentifier(var.Name), true);
         var.WasSet = false; // Value has been used; no longer new
     }
     else
     { // Indicate that this input has NOT received a value
         updateField(createIsVariableValueSetIdentifier(var.Name), false);
     }
 }
Esempio n. 5
0
 public void AggregateValidation(ValueObjectBase childDto)
 {
     //TODO: When composition of Dto's appears.
     //if (childDto.Validation == null || (childDto.Validation.HasErrors == false))
     //{
     //    return;
     //}
     //else if (Validation == null)
     //{
     //    Validation = new DtoValidation();
     //    Validation.Aggregate(childDto.Validation);
     //}
     //else
     //{
     //    Validation.Aggregate(childDto.Validation);
     //}
 }
 public bool Equals(ValueObjectBase other)
 {
     return(GetEqualityCheckAttributes().SequenceEqual(other.GetEqualityCheckAttributes()));
 }
Esempio n. 7
0
        public void ThrowExceptionIfInvalidTest()
        {
            ValueObjectBase target = CreateValueObjectBase();

            target.ThrowExceptionIfInvalid();
        }