示例#1
0
 public KnowledgeBaseInfo()
 {
     Author = "";
     Copyright = "";
     License = "";
     AuthorWebsite = "";
     CreationDate = DateTime.Now;
     LastUpdateDate = DateTime.Now;
     Rating = new KnowledgeBaseRating();
     Language = LanguageType.English;
     Category = CategoryType.Other;
     Comment = "";
 } //KnowledgeBaseInfo
示例#2
0
        } //KnowledgeBaseInfo

        protected KnowledgeBaseInfo(SerializationInfo info, StreamingContext context)
        {
            Author = info.GetString("a");
            Copyright = info.GetString("copy");
            License = info.GetString("lic");
            AuthorWebsite = info.GetString("aw");
            CreationDate = (DateTime) info.GetValue("cd", typeof(DateTime));
            LastUpdateDate = (DateTime) info.GetValue("lud", typeof(DateTime));
            Rating = (KnowledgeBaseRating) info.GetValue("r", typeof(KnowledgeBaseRating));
            Language = (LanguageType) info.GetValue("lang", typeof(LanguageType));
            Category = (CategoryType) info.GetValue("cat", typeof(CategoryType));
            Comment = info.GetString("comment");
            //use a try/catch block around any new vales
        }