Exemplo n.º 1
0
        public async Task AddMetaIdeas()
        {
            Stopwatch sw = Stopwatch.StartNew();

            using (MetaDataRepository db = new MetaDataRepository())
            {
                MetaObject mo;



                mo = new MetaObject("P-X Idea", Guid.NewGuid().ToString());
                mo.AddProperty <string>("Name", string.Format("name-{0}", 1));
                mo.AddProperty <string>("Description", string.Format("description-{0}", 1));
                mo.AddProperty <string>("Submitter", string.Format("submitter-{0}", 1));

                await db.SaveMetaDataAsync(mo);
            }
            sw.Stop();
            Trace.TraceInformation("AddMetaIdeas took {0} ms.", sw.Elapsed.TotalMilliseconds);
        }
Exemplo n.º 2
0
        public async Task AddProviderDataString(int providerID, string tag, List <string> data)
        {
            Stopwatch sw = Stopwatch.StartNew();

            var        type       = data[0].GetType();
            var        properties = type.GetProperties();
            MetaObject mo         = new MetaObject("ProviderData", providerID.ToString());

            mo.AddProperty <List <string> >(tag, (List <string>)data);

            using (MetaDataRepository db = new MetaDataRepository())
            {
                await db.SaveMetaDataAsync(mo);
            }
            sw.Stop();
            Trace.TraceInformation("AddMetaIdeas took {0} ms.", sw.Elapsed.TotalMilliseconds);
        }