Ejemplo n.º 1
0
 /// <param name="_matchModifier">never null</param>
 public MatchExpression(IList <IExpression> columns, IExpression pattern,
                        MatchModifier _matchModifier)
 {
     if (columns == null || columns.IsEmpty())
     {
         Columns = new List <IExpression>(0);
     }
     else
     {
         if (columns is List <IExpression> )
         {
             Columns = columns;
         }
         else
         {
             Columns = new List <IExpression>(columns);
         }
     }
     Pattern  = pattern;
     Modifier = _matchModifier;
 }
Ejemplo n.º 2
0
        public MatchModifier ToMatchModifier(GameData gameData)
        {
            var newMM = new MatchModifier();

            newMM.absorb             = Absorb;
            newMM.absorbAltGirl      = AbsorbAltGirl;
            newMM.replacePriority    = ReplacePriority;
            newMM.skipMostFavFactor  = SkipMostFavFactor;
            newMM.skipLeastFavFactor = SkipLeastFavFactor;
            newMM.pointsOp           = PointsOp;
            newMM.pointsOperation    = PointsOperation;
            newMM.pointsFactor       = PointsFactor;
            newMM.pointsOp2          = PointsOp2;
            newMM.pointsOperation2   = PointsOperation2;
            newMM.pointsFactor2      = PointsFactor2;

            newMM.tokenDefinition   = gameData.Tokens.Get(TokenDefinitionID);
            newMM.replaceDefinition = gameData.Tokens.Get(ReplaceDefinitionID);

            return(newMM);
        }
Ejemplo n.º 3
0
 /// <param name="_matchModifier">never null</param>
 public MatchExpression(IList<IExpression> columns, IExpression pattern,
                        MatchModifier _matchModifier)
 {
     if (columns == null || columns.IsEmpty())
     {
         Columns = new List<IExpression>(0);
     }
     else
     {
         if (columns is List<IExpression>)
         {
             Columns = columns;
         }
         else
         {
             Columns = new List<IExpression>(columns);
         }
     }
     Pattern = pattern;
     Modifier = _matchModifier;
 }
Ejemplo n.º 4
0
        public MatchModifierInfo(MatchModifier matchModifier)
        {
            if (matchModifier == null)
            {
                return;
            }

            Absorb             = matchModifier.absorb;
            AbsorbAltGirl      = matchModifier.absorbAltGirl;
            ReplacePriority    = matchModifier.replacePriority;
            SkipMostFavFactor  = matchModifier.skipMostFavFactor;
            SkipLeastFavFactor = matchModifier.skipLeastFavFactor;
            PointsOp           = matchModifier.pointsOp;
            PointsOperation    = matchModifier.pointsOperation;
            PointsFactor       = matchModifier.pointsFactor;
            PointsOp2          = matchModifier.pointsOp2;
            PointsOperation2   = matchModifier.pointsOperation2;
            PointsFactor2      = matchModifier.pointsFactor2;

            TokenDefinitionID   = matchModifier.tokenDefinition?.id ?? -1;
            ReplaceDefinitionID = matchModifier.replaceDefinition?.id ?? -1;
        }
Ejemplo n.º 5
0
 public static bool Match(this IMySqlExtensions ext, [SqlQueryDependent] MatchModifier modifier, [ExprParameter] string search, [ExprParameter] params object[] columns)
 {
     throw new LinqException($"'{nameof(Match)}' is server-side method.");
 }