예제 #1
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;
        }
예제 #2
0
 public static void ApplyImplSettings(QuerySettingsImpl ws, QuerySettingsImpl rs)
 {
     ws.UseLuceneForSetMaxDepth = Math.Min(rs.UseLuceneForSetMaxDepth, ws.UseLuceneForSetMaxDepth);
     ws.UseLuceneForGetMaxDepth = Math.Min(rs.UseLuceneForGetMaxDepth, ws.UseLuceneForGetMaxDepth);
 }