64 lines
1.7 KiB
C#
64 lines
1.7 KiB
C#
using Newtonsoft.Json.Linq;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ssgrestserver
|
|
{
|
|
abstract class AInputTextHandler : ARequestObject
|
|
{
|
|
|
|
protected string updateTextName = "";
|
|
|
|
protected abstract void setUpdateData();
|
|
|
|
protected override string startUpdateWork()
|
|
{
|
|
this.setUpdateData();
|
|
|
|
if (!mRequestParameterKVPairList.ContainsKey("보낸사람"))
|
|
{
|
|
return "없는데이터 - 보낸사람";
|
|
}
|
|
if (!mRequestParameterKVPairList.ContainsKey(updateTextName))
|
|
{
|
|
return "없는데이터 - " + updateTextName;
|
|
}
|
|
|
|
코더확인객채생성여부();
|
|
|
|
JObject bufObj = new JObject();
|
|
|
|
bufObj.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
|
|
|
bufObj.Add(updateTextName, mRequestParameterKVPairList[updateTextName]);
|
|
|
|
bufObj.Add("입력시간", DateTime.Now.ToString());
|
|
|
|
if (mAccessableDictionary.ContainsKey(m채널이름))
|
|
{
|
|
mAccessableDictionary[m채널이름] = bufObj;
|
|
}
|
|
else
|
|
{
|
|
mAccessableDictionary.Add(m채널이름, bufObj);
|
|
}
|
|
|
|
|
|
JObject retObj = new JObject();
|
|
|
|
|
|
foreach (var item in mAccessableDictionary[m채널이름])
|
|
{
|
|
retObj.Add(item.Key, item.Value);
|
|
}
|
|
|
|
retObj.Add("status", "200");
|
|
|
|
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
|
}
|
|
}
|
|
}
|