public static LightWeightObject ToLightWeight(this ITextStatistic iStatistic)
        {
            LightWeightObject lightWeightObject = new LightWeightObject
                {
                    WordFrequencyDictionary = iStatistic.WordFrequencyDictionary
                };

            return lightWeightObject;
        }
Exemplo n.º 2
0
        private void AddLightObjToDb(LightWeightObject lightObj, User user, string fileName)
        {
            using (Db.Server.RequestStart(Db.Database))
            {
                var collection = Db.Database.GetCollection<LightWeightObject>("lightObjCollection");

                collection.Insert(lightObj);

                user.ListFiles.Add(new UploadedFileInfo(lightObj.Id, fileName));

                Session.Add("user", user);
            }
        }