/// <summary> /// Converts a QualifierCommand into an Expando object /// </summary> /// <param retval="qualifier"></param> /// <returns>Qualifer Command as Expando object</returns> public static Expando AsExpando(this QualifierCommand qualifier) { var expando = new Expando(); expando[qualifier.CommandName] = qualifier.ValueForCommand; return(expando); }
public static Expando And(this QualifierCommand baseCommand, params QualifierCommand[] additionalQualifiers) { var retval = new Expando(); retval[baseCommand.CommandName] = baseCommand.ValueForCommand; foreach (var q in additionalQualifiers) { retval[q.CommandName] = q.ValueForCommand; } return(retval); }