Example #1
0
        public async Task GetProviderData(int providerID, string tag)
        {
            Stopwatch sw    = Stopwatch.StartNew();
            int       count = 0;

            using (MetaDataRepository db = new MetaDataRepository())
            {
                var data = await db.GetMetaObjectsAsync("ProviderData", providerID.ToString(), tag);

                count = data.Count;
                foreach (var i in data)
                {
                    var    objects = i.GetPropertyValue <List <string> >(tag);
                    string d       = "";
                }
            }
            sw.Stop();
            Trace.TraceInformation("{0} with P-{1} took {2} ms. Found {3} objects.", "random", "P-X Idea", sw.Elapsed.TotalMilliseconds, count);
        }
Example #2
0
        public async Task GetIdeas()
        {
            Stopwatch sw    = Stopwatch.StartNew();
            int       count = 0;

            using (MetaDataRepository db = new MetaDataRepository())
            {
                var data = await db.GetMetaObjectsAsync("P-X Idea");

                count = data.Count;
                foreach (var i in data)
                {
                    //Trace.TraceInformation(i.ToString());
                    //Trace.TraceInformation("Decrypted: {0}", i.GetPropertyValue<string>("Name", decryptionKey: decryptionKey));
                    //Trace.TraceInformation("Decrypted: {0}", i.GetPropertyValue<string>("Description", decryptionKey: decryptionKey));
                    var name        = i.GetPropertyValue <string>("Name");
                    var description = i.GetPropertyValue <string>("Description");
                    var submitter   = i.GetPropertyValue <string>("Submitter");
                    Trace.TraceInformation($"Object on {i.Object} Name on {name}, Desc on {description}, submitter on {submitter}");
                }
            }
            sw.Stop();
            Trace.TraceInformation("{0} with P-{1} took {2} ms. Found {3} objects.", "random", "P-X Idea", sw.Elapsed.TotalMilliseconds, count);
        }