Example #1
0
        public static void IncreaseLimits(QuerySettingsSettable request, int mins, int maxs)
        {
            return;

            //request.MinOutputs = ((QuerySettingsReadOnly)request).MinOutputs + mins;
            request.MinTemplates = ((QuerySettingsReadOnly)request).MinTemplates + mins;
            request.MinPatterns  = ((QuerySettingsReadOnly)request).MinPatterns + mins;
            //request.MaxOutputs = ((QuerySettingsReadOnly)request).MaxOutputs + maxs;
            request.MaxTemplates             = ((QuerySettingsReadOnly)request).MaxTemplates + maxs;
            request.MaxPatterns              = ((QuerySettingsReadOnly)request).MaxPatterns + maxs;
            request.ProcessMultipleTemplates = true;
            request.ProcessMultiplePatterns  = true;
        }
Example #2
0
        public static void ApplySettings(QuerySettings r, QuerySettingsSettable w)
        {
            if (r == null || w == null || r == w)
            {
                return;
            }
            if (r.IsTraced)
            {
                w.IsTraced = true;
            }
            w.MaxTemplates             = r.MaxTemplates;
            w.MaxPatterns              = r.MaxPatterns;
            w.MaxOutputs               = r.MaxOutputs;
            w.MinTemplates             = r.MinTemplates;
            w.MinPatterns              = r.MinPatterns;
            w.MaxSetVars               = r.MaxSetVars;
            w.MaxGetVars               = r.MaxGetVars;
            w.UseDictForSetMaxDepth    = r.UseDictForSetMaxDepth;
            w.ProcessMultipleTemplates = r.ProcessMultipleTemplates;
            w.ProcessMultiplePatterns  = r.ProcessMultiplePatterns;
            w.SraiDepth.SetConstraintsFrom(r.SraiDepth);
            var rs = r as QuerySettingsImpl;

            if (rs != null)
            {
                var ws = w as QuerySettingsImpl;
                if (ws != null)
                {
                    QuerySettingsImpl.ApplyImplSettings(ws, rs);
                }
            }

            //  GraphMaster gm = r.Graph;
            //  if (gm != null) w.Graph = gm;
            //  string gn = r.GraphName;
            //  if (gn != null)  w.GraphName = gn;
        }