스크립트 중복제거 처리 추가
ChangeScript 키값 숫자 한정에서 문자열 전체 가능하도록 수정
This commit is contained in:
@@ -479,9 +479,9 @@ namespace Million_Prototype
|
||||
|
||||
Dictionary<string, bool> aa1 = new Dictionary<string, bool>();
|
||||
aa1["1"] = true;
|
||||
aa1["2"] = true;
|
||||
aa1["11"] = false;
|
||||
aa1["22"] = true;
|
||||
aa1["11"] = false;
|
||||
aa1["2"] = true;
|
||||
|
||||
Dictionary<string, bool> aa2 = new Dictionary<string, bool>();
|
||||
aa2["1"] = true;
|
||||
@@ -489,11 +489,31 @@ namespace Million_Prototype
|
||||
aa2["11"] = true;
|
||||
aa2["22"] = true;
|
||||
|
||||
Dictionary<string, bool> aa3 = new Dictionary<string, bool>();
|
||||
aa3["1"] = true;
|
||||
aa3["2"] = true;
|
||||
aa3["11"] = false;
|
||||
aa3["22"] = true;
|
||||
|
||||
Dictionary<string, bool> aa4 = new Dictionary<string, bool>();
|
||||
aa4["1"] = true;
|
||||
aa4["2"] = true;
|
||||
|
||||
var returnvalue = aa1.Except(aa3).Any();
|
||||
returnvalue = aa1.Except(aa2).Any();
|
||||
returnvalue = aa1.Except(aa4).Any();
|
||||
|
||||
var ss123 = aa1.Except(aa3);
|
||||
ss123 = aa1.Except(aa2);
|
||||
ss123 = aa1.Except(aa4);
|
||||
|
||||
|
||||
InteratorScripter ss = new InteratorScripter();
|
||||
ss.regularExpressionString = aa;
|
||||
|
||||
ss.DicExcuteScript(aa1);
|
||||
ss.DicExcuteScript(aa2);
|
||||
ss.DicExcuteScript(aa3);
|
||||
/*
|
||||
|
||||
var resultstring = InteratorScripter.ChangeScript(aa, aa1);
|
||||
|
||||
@@ -26,9 +26,11 @@ namespace Million.Manager
|
||||
/// <returns></returns>
|
||||
public bool DicExcuteScript(Dictionary<string,bool> RegularExpression)
|
||||
{
|
||||
if(rememberDic.ContainsKey(RegularExpression))
|
||||
//중복 검사
|
||||
var data = rememberDic.Keys.FirstOrDefault(x => !x.Except(RegularExpression).Any());
|
||||
if (data != null)
|
||||
{
|
||||
return rememberDic[RegularExpression];
|
||||
return rememberDic[data];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -45,8 +47,7 @@ namespace Million.Manager
|
||||
public static string ChangeScript(string script, Dictionary<string,bool> conditionDic)
|
||||
{
|
||||
var conList = conditionDic.ToList();
|
||||
conList.Sort((x,y)=>int.Parse( x.Key).CompareTo(int.Parse(y.Key)));
|
||||
conList.Reverse();
|
||||
conList.Sort((x,y)=> y.Key.Length.CompareTo(x.Key.Length));
|
||||
|
||||
foreach(var con in conList)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user