Beispiel #1
0
        public PCDController()
        {
            string ClassName = "ProcessXml", SetString = "SetPath", InitXmlDoc = "InitXml";
            MemoryCacherApi Cache = new MemoryCacherApi();

            //init setting
            if ((Info = (SettingInfo)Cache.GetValue(SetString)) == null)
            {
                Info = new SettingInfo();
                DateTimeOffset TimeOffset = DateTimeOffset.Now.AddMonths(1);
                Cache.AddCache(SetString, Info, TimeOffset);
            }

            //init xml
            if ((Xml = (InitXml)Cache.GetValue(InitXmlDoc)) == null)
            {
                Xml = new InitXml(Info);
                DateTimeOffset TimeOffset = DateTimeOffset.Now.AddHours(5);
                Cache.AddCache(InitXmlDoc, Xml, TimeOffset);
            }

            //init processxml
            if ((XmlOperation = (ProcessXml)Cache.GetValue(ClassName)) == null)
            {
                XmlOperation = new ProcessXml(Info, Xml);
                DateTimeOffset TimeOffset = DateTimeOffset.Now.AddHours(5);
                Cache.AddCache(ClassName, XmlOperation, TimeOffset);
            }
        }
Beispiel #2
0
 //建構
 public ProcessXml(SettingInfo Path_Info, InitXml XmlDoc)
 {
     this.Path_Info = Path_Info;
     this.XmlInCacher = XmlDoc;
 }