-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathProgram.cs
More file actions
66 lines (60 loc) · 2.38 KB
/
Program.cs
File metadata and controls
66 lines (60 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using CoreHelpers.WindowsAzure.Storage.Table.Demo.Contracts;
using CoreHelpers.WindowsAzure.Storage.Table.Demo.DemoCases;
using CoreHelpers.WindowsAzure.Storage.Table.Demo.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace CoreHelpers.WindowsAzure.Storage.Table.Demo
{
class Program
{
static async Task Main(string[] args)
{
// read the config
var configLocation = Path.Combine("..", "Credentials.json");
JObject config = (JObject)JsonConvert.DeserializeObject(File.ReadAllText(configLocation));
// register all demo cases
var cases = new List<IDemoCase>
{
// new UC01StoreWithStaticEntityMapper(),
// new UC02StoreWithAttributeMapper(),
// new UC03StoreWithAttributeMapperManualRegistration(),
// new UC04GetVirtualArray(),
// new UC05StoreAsJson(),
// new UC06AutoCreateTable(),
// new UC07CreateModelsPaged(),
// new UC08CheckMaxItems(),
// new UC09ReadInterfaceValues(),
new UC10CreateHugeAmountOfDemoEntries(),
// new UC11ReadPageByPage(),
// new UC12PartialUpdateMergeModel(),
// new UC13DynamicallyCreateList(),
// new UC14WriteNullList(),
// new UC15DynamicTableNameChange(),
// new UC16Backup()
// new UC17Restore()
// new UC18DateTime()
// new UC19QueryFilter()
};
// register demo cases for Ger Cloud
var casesGer = new List<IDemoCase>
{
new UC06AutoCreateTable()
};
// execute in WW cloud
Console.WriteLine("Executing Demo Cases (WW Cloud)");
foreach (var useCase in cases)
await useCase.Execute(config.GetValue("key").ToString(), config.GetValue("secret").ToString());
Console.ReadKey();
// execute in GER cloud
/*Console.WriteLine("Executing Demo Cases (GER Cloud)");
foreach (var useCase in casesGer)
await useCase.Execute(config.GetValue("keyde").ToString(), config.GetValue("secretde").ToString(), "core.cloudapi.de"); */
}
}
}