コード例 #1
0
    public OrientationCubeComponentSolver(TwitchModule module) :
        base(module)
    {
        var component = module.BombComponent.GetComponent(ComponentType);

        _submit = (MonoBehaviour)SubmitField.GetValue(component);
        _left   = (MonoBehaviour)LeftField.GetValue(component);
        _right  = (MonoBehaviour)RightField.GetValue(component);
        _ccw    = (MonoBehaviour)CcwField.GetValue(component);
        _cw     = (MonoBehaviour)CwField.GetValue(component);
        ModInfo = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "Move the cube with !{0} press cw l set. The buttons are l, r, cw, ccw, set.");
    }
コード例 #2
0
        /// <summary>
        /// 克隆
        /// </summary>
        /// <returns>关联条件项</returns>
        public override object Clone()
        {
            JoinConditionItem newValue = base.Clone() as JoinConditionItem;

            if (LeftField != null)
            {
                newValue.LeftField = LeftField.Clone() as ConditionField;
            }
            if (RightField != null)
            {
                newValue.RightField = RightField.Clone() as ConditionField;
            }

            return(newValue);
        }
コード例 #3
0
ファイル: JoinClause.cs プロジェクト: sedu/TSqlQueryBuilder
        public override TSqlQuery Compile(ClauseCompilationContext context)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append($"{JoinType.GetDescription()} {TSqlSyntax.Join} {SqlBuilderHelper.PrepareTableName(JoinedTable)}");
            if (TableHints.HasValue)
            {
                string hints = SqlBuilderHelper.GetTableHintString(TableHints.Value);
                sb.Append(" ");
                sb.Append($"{TSqlSyntax.With}({hints})");
            }
            sb.Append(" ");
            sb.Append($"{TSqlSyntax.On} {LeftField.GetFullName()} {SqlBuilderHelper.ConvertBinaryOperationToString(Operation)} {RightField.GetFullName()}");

            return(new TSqlQuery(sb.ToString()));
        }
コード例 #4
0
 /// <summary>
 /// 设置表名
 /// </summary>
 /// <param name="tName"></param>
 public void SetTable(string tName)
 {
     if ((LeftField as object) != null)
     {
         LeftField.SetTableName(tName);
     }
     if ((RightField as object) != null)
     {
         RightField.SetTableName(tName);
     }
     if (Left != null)
     {
         Left.SetTable(tName);
     }
     if (Right != null)
     {
         Right.SetTable(tName);
     }
 }
コード例 #5
0
 /// <summary>
 /// 转换成SQL
 /// </summary>
 /// <returns>SQL</returns>
 public override string ToSQL()
 {
     return(string.Format("{0}={1}", LeftField.ToSQL(), RightField.ToSQL()));
 }