public TwoEstimate(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier, string category) : base(sqlUtils, ruleSupplier, category) { m_ruleExecuter += new RuleExecuterDelegate(TwoEstimateMethod); m_ruleInitializer += new RuleExecuterDelegate(internalInit); Id = TwoEstimateStr; }
public Rule(RuleExecuterDelegate executer, RuleExecuterDelegate initializer, IRuleSupplier ruleSupplier) : this(ruleSupplier) { if (executer == null) throw new ArgumentNullException("executer"); m_ruleExecuter += executer; if (initializer != null) m_ruleInitializer += initializer; }
public RepairKeySample(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier, string category) : base(sqlUtils, ruleSupplier, category) { m_ruleExecuter += new RuleExecuterDelegate(SampleWithJoin); m_ruleInitializer += new RuleExecuterDelegate(internalInit); Id = "RepairKeySample"; PrerequisiteRules = new List<DCF.Lib.Rule>(); }
public Majority(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier, string category) : base(sqlUtils, ruleSupplier, category) { m_ruleInitializer += new RuleExecuterDelegate(internalInit); m_ruleExecuter += new RuleExecuterDelegate(MajorityFunc); Id = "MajorityRule"; PrerequisiteRules = new List<Rule>(0); }
public Cosine(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier, string category) : base(sqlUtils, ruleSupplier, category) { m_ruleExecuter += new RuleExecuterDelegate(CosineMethod); m_ruleInitializer += new RuleExecuterDelegate(internalInit); Id = CosineStr; InvolvedTables = new List<string>(new string[] { TableConstants.UserScores }); AffectedTables = new List<string>(); }
private void CreateInboundSPScript(IInboundRule[] ruleList) { string interfaceName = Program.DeviceMgt.DeviceDirInfor.Header.Name; string fnameInstall = Application.StartupPath + "\\" + RuleScript.InstallSP.FileName; string fnameUninstall = Application.StartupPath + "\\" + RuleScript.UninstallSP.FileName; Program.Log.Write("Creating install storage procedure script..."); //using (StreamWriter sw = File.CreateText(fnameInstall)) // 20110706 OSQL & SQLMgmtStudio only support ASCII and UNICODE { StringBuilder sb = new StringBuilder(); sb.AppendLine(GWDataDB.GetUseDataBaseSql()); foreach (IInboundRule rule in ruleList) { string strSql = RuleControl.GetInboundSP(interfaceName, rule); sb.AppendLine(strSql); IRuleSupplier supplier = rule as IRuleSupplier; if (supplier != null) { string strSqlSupplied = supplier.GetInstallDBScript(); if (strSqlSupplied != null) { sb.AppendLine(strSqlSupplied); } } } //sw.Write(sb.ToString()); File.WriteAllText(fnameInstall, sb.ToString(), Encoding.Unicode); } Program.Log.Write("Create install storage procedure script succeeded. " + fnameInstall); Program.Log.Write("Creating uninstall storage procedure script..."); using (StreamWriter sw = File.CreateText(fnameUninstall)) { StringBuilder sb = new StringBuilder(); sb.AppendLine(GWDataDB.GetUseDataBaseSql()); foreach (IInboundRule rule in ruleList) { string strSql = RuleControl.GetInboundSPUninstall(interfaceName, rule); sb.AppendLine(strSql); IRuleSupplier supplier = rule as IRuleSupplier; if (supplier != null) { string strSqlSupplied = supplier.GetUninstallDBScript(); if (strSqlSupplied != null) { sb.AppendLine(strSqlSupplied); } } } sw.Write(sb.ToString()); } Program.Log.Write("Create uninstall storage procedure script succeeded. " + fnameUninstall); }
public MultipleAnswersSample(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier, string category) : base(sqlUtils, ruleSupplier) { m_ruleExecuter += new RuleExecuterDelegate(SampleWithJoin); m_ruleInitializer += new RuleExecuterDelegate(internalInit); Id = "MultipleAnswersSample"; InvolvedTables = new List<string>(); AffectedTables = new List<string>(); PrerequisiteRules = new List<DCF.Lib.Rule>(); Category = category; }
public Rule(IRuleSupplier ruleSupplier) { RuleType = RuleTypeEnum.System; Persistent = true; Id = Guid.NewGuid().ToString(); Probability = 1; InvolvedTables = null; AffectedTables = null; PrerequisiteRules = null; Precedence = PresedenceEnum.None; PrecedencePriority = 0; RuleSupplier = ruleSupplier; }
public DanielConvergence(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier) : base(sqlUtils, ruleSupplier) { this.AffectedTables = new List<string>(); this.Id = "DanielConvergence"; this.InvolvedTables = new List<string>() { TableConstants.UserScores }; this.PrerequisiteRules = new List<DCF.Lib.Rule>(); this.RuleType = RuleTypeEnum.System; this.m_ruleExecuter += new RuleExecuterDelegate(CosineConverged_m_ruleExecuter); this.m_ruleInitializer += new RuleExecuterDelegate(CosineConverged_m_ruleInitializer); // initialize the threshold m_ConvergenceThreshold = CleaningConfiguration.Instance.ConversionDelta; // initialize convergence count - number of good samples in a row that need to be good in order to decide converence m_ConvergenceSamplesCount = CleaningConfiguration.Instance.ConversionSamplesCount; }
public DcfRule(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier, string category) : base(sqlUtils, ruleSupplier) { Category = category; }
public SingleIterationSingleAnswersRule(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier, string category) : base(sqlUtils, ruleSupplier, category) { }
public XmlMySqlRule(MySqlUtils utils, IRuleSupplier ruleSupplier) : base(utils, ruleSupplier) { m_ruleExecuter += new RuleExecuterDelegate(XmlMySqlRuleExecuter); m_ruleInitializer += new RuleExecuterDelegate(XmlMySqlRuleInitializer); }
public RuleTestMaxIteration(IRuleSupplier ruleSupplier) : base(ruleSupplier) { m_ruleExecuter += new RuleExecuterDelegate(RuleTestMaxIteration_m_ruleExecuter); this.Id = "RuleTestMaxIteration"; }
public CleansingManager(IRuleSupplier ruleSupplier) { m_ruleSupplier = ruleSupplier; }
protected MySqlRule(MySqlUtils sqlUtils, IRuleSupplier ruleSupplier) : base(ruleSupplier) { SqlUtils = sqlUtils; }