BFSchema.CodeGenerators.CSharp.IfThenElseSequence.IfThenElseSequence C# (CSharp) Method

IfThenElseSequence() public method

public IfThenElseSequence ( string indent, string errorValue ) : System.Collections.Generic
indent string
errorValue string
return System.Collections.Generic
        public IfThenElseSequence(string indent, string errorValue)
        {
            Indent = indent;
            ErrorValue = errorValue;
            Indent = string.Empty;
            ElseBlock = new IfBlock("");
            if(errorValue != null && errorValue != string.Empty)
                ElseBlock.CodeLines.Add("throw new Exception(\"Enum did not match! "+ errorValue +"'.\");");
            else
                ElseBlock.CodeLines.Add("throw new Exception(\"Enum did not match!\");");
        }