예제 #1
0
        private void init(byte[] k, byte[] v)
        {
            this.compiledKnowledgeBases = new Dictionary <string, CompiledKnowledgeBase>();
            xmlToolbox = new XMLToolbox(typeof(KnowledgeBase));
            RijndaelManaged crypto = new RijndaelManaged();

            this.encryptor = crypto.CreateEncryptor(k, v);
            this.decryptor = crypto.CreateDecryptor(k, v);
        }
예제 #2
0
        }//loadReplacementProfiles(List<ResourceFile> resourceFiles)

        private void loadCodeModules(List <ResourceFile> resourceFiles)
        {
            XMLToolbox xmlToolbox = new XMLToolbox(typeof(CodeModule));
            CodeModule cm;

            foreach (ResourceFile rf in resourceFiles)
            {
                if (rf.Filetype == ResourceFileType.CodeModuleFile)
                {
                    cm = (CodeModule)xmlToolbox.LoadXML(this.knowledgeBaseItem.Fullpath + rf.Filename);
                    this.csToolbox.AddCodeModule(cm);
                }        //end if ReplacementProfileFile
            }            //foreach resource file
        }//loadCodeModules(List<ResourceFile> resourceFiles)
예제 #3
0
        }//loadSynonyms(List<ResourceFile> resourceFiles)

        private void loadReplacementProfiles(List <ResourceFile> resourceFiles)
        {
            XMLToolbox         xmlToolbox = new XMLToolbox(typeof(ReplacementProfile));
            ReplacementProfile rp;

            foreach (ResourceFile rf in resourceFiles)
            {
                if (rf.Filetype == ResourceFileType.ReplacementProfileFile)
                {
                    rp = (ReplacementProfile)xmlToolbox.LoadXML(this.knowledgeBaseItem.Fullpath + rf.Filename);
                    this.replacements.AddRange(rp.Replacements);
                    this.inputReplacements.AddRange(rp.InputReplacements);
                }        //end if ReplacementProfileFile
            }            //foreach resource file
        }//loadReplacementProfiles(List<ResourceFile> resourceFiles)
예제 #4
0
        }//LoadResourceFiles(List<ResourceFile> resourceFiles)

        private void loadSynonyms(List <ResourceFile> resourceFiles)
        {
            XMLToolbox   xmlToolbox = new XMLToolbox(typeof(SynonymGroup));
            SynonymGroup sg;

            foreach (ResourceFile rf in resourceFiles)
            {
                if (rf.Filetype == ResourceFileType.SynonymFile)
                {
                    sg = (SynonymGroup)xmlToolbox.LoadXML(this.knowledgeBaseItem.Fullpath + rf.Filename);
                    foreach (Synonym s in sg.Synonyms)
                    {
                        s.Phrases.Sort();
                        this.synonyms[s.Name.ToLower()] = s;
                    }
                }        //end if SynonymFile
            }            //foreach resource file
        }//loadSynonyms(List<ResourceFile> resourceFiles)
예제 #5
0
 private void loadSynonyms(List<ResourceFile> resourceFiles)
 {
     XMLToolbox xmlToolbox = new XMLToolbox(typeof(SynonymGroup));
     SynonymGroup sg;
     foreach(ResourceFile rf in resourceFiles)
     {
         if(rf.Filetype == ResourceFileType.SynonymFile)
         {
             sg = (SynonymGroup)xmlToolbox.LoadXML(this.knowledgeBaseItem.Fullpath + rf.Filename);
             foreach(Synonym s in sg.Synonyms)
             {
                 s.Phrases.Sort();
                 this.synonyms[s.Name.ToLower()] = s;
             }
         }//end if SynonymFile
     }//foreach resource file
 }
예제 #6
0
 private void loadReplacementProfiles(List<ResourceFile> resourceFiles)
 {
     XMLToolbox xmlToolbox = new XMLToolbox(typeof(ReplacementProfile));
     ReplacementProfile rp;
     foreach(ResourceFile rf in resourceFiles)
     {
         if(rf.Filetype == ResourceFileType.ReplacementProfileFile)
         {
             rp = (ReplacementProfile)xmlToolbox.LoadXML(this.knowledgeBaseItem.Fullpath + rf.Filename);
             this.replacements.AddRange(rp.Replacements);
             this.inputReplacements.AddRange(rp.InputReplacements);
         }//end if ReplacementProfileFile
     }//foreach resource file
 }
예제 #7
0
 private void loadCodeModules(List<ResourceFile> resourceFiles)
 {
     XMLToolbox xmlToolbox = new XMLToolbox(typeof(CodeModule));
     CodeModule cm;
     foreach(ResourceFile rf in resourceFiles)
     {
         if(rf.Filetype == ResourceFileType.CodeModuleFile)
         {
             cm = (CodeModule)xmlToolbox.LoadXML(this.knowledgeBaseItem.Fullpath + rf.Filename);
             this.csToolbox.AddCodeModule(cm);
         }//end if ReplacementProfileFile
     }//foreach resource file
 }
예제 #8
0
 private void init(byte[] k, byte[] v)
 {
     this.compiledKnowledgeBases = new Dictionary<string,CompiledKnowledgeBase>();
     xmlToolbox = new XMLToolbox(typeof(KnowledgeBase));
     RijndaelManaged crypto = new RijndaelManaged();
     this.encryptor = crypto.CreateEncryptor(k, v);
     this.decryptor = crypto.CreateDecryptor(k, v);
 }