/// <summary> /// Lookup for the opposite type of a connection. /// </summary> public static EConnection OppositeConnection(EConnection connectionType) { switch (connectionType) { case EConnection.InputValue: return(EConnection.OutputValue); case EConnection.OutputValue: return(EConnection.InputValue); case EConnection.NextStatement: return(EConnection.PrevStatement); case EConnection.PrevStatement: return(EConnection.NextStatement); } return(EConnection.None); }
public IConnection Initialize(EConnection con) { switch (con) { case EConnection.Oracle: return(new Oracle()); case EConnection.SQL: return(new SQL()); default: throw new Exception("Connection not found"); } }
public void GetStateMemento(ConnectionMemento connectionMemento) { econnection = connectionMemento.GetState(); }
public void SetState(EConnection econnection) { this.econnection = econnection; }
public ConnectionMemento(EConnection econnection) { this.econnection = econnection; }
private static string BuildFilterStringItem(EFilterType FilterItemType, string Name, EConnection Connection, EFunction Function, EOperator Operator, string ValueType, string Value, string Value1Type, string Value1, string Value2Type, string Value2) { StringBuilder current = new StringBuilder(); current.Append("{"); current.Append("" + Name + ":{"); current.Append($"{ Operator.ToString().ToLower()}" + ":{"); if (FilterItemType == EFilterType.MultiValue) { current.AppendFormat("Value1Type:\"{0}\",", Value1Type); current.AppendFormat("Value1:\"{0}\",", Value1); current.AppendFormat("Value2Type:\"{0}\",", Value2Type); current.AppendFormat("Value2:\"{0}\"", Value2); } else { current.AppendFormat("ValueType:\"{0}\",", ValueType); current.AppendFormat("Value:\"{0}\"", Value); } current.Append("}"); current.Append("}"); current.Append("}"); return(current.ToString()); }