public KnowledgeBaseInfo() { Author = ""; Copyright = ""; License = ""; AuthorWebsite = ""; CreationDate = DateTime.Now; LastUpdateDate = DateTime.Now; Rating = new KnowledgeBaseRating(); Language = LanguageType.English; Category = CategoryType.Other; Comment = ""; } //KnowledgeBaseInfo
} //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 }