깊은 복사 형태로 수정

This commit is contained in:
김민서 2024-02-26 16:46:48 +09:00
parent 53699cf5ae
commit d9e3dd9a1f
1 changed files with 12 additions and 2 deletions

View File

@ -29,12 +29,22 @@ namespace Server.Git
break;
case "client":
clientSheetList.Add(sheets[m].name, sheets[m].dicViewer);
Console.WriteLine("client : " + sheets[m].name);
break;
case "all":
//수정할것 이렇게 작업되면 데이터가 2개로 나눠지는것이 아닌 한개의 데이터가 중복으로 제거됨.
string name = sheets[m].name;
Dictionary<long, Dictionary<string, object>> clientSheet = sheets[m].dicViewer;
Dictionary<long, Dictionary<string, object>> serverSheet = new Dictionary<long, Dictionary<string, object>>(sheets[m].dicViewer);
Dictionary<long, Dictionary<string, object>> clientSheet = new Dictionary<long, Dictionary<string, object>>(sheets[m].dicViewer);
for (int i = 1; i < sheets[m].dataEnum.Count; i++)
{
if (sheets[m].dataEnum[i] == "client")
{
foreach (var item in serverSheet)
{
item.Value.Remove(sheets[m].variable[i]);
}
}
}
for (int i = 1; i < sheets[m].dataEnum.Count; i++)
{
if (sheets[m].dataEnum[i] == "server")