Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Commit 9cad98e

Browse files
committed
import AppCenter SDK
1 parent ce9652a commit 9cad98e

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,24 @@ App Center Interop example for c++/c#(winforms).
1616
dotnet add package Microsoft.AppCenter.Analytics --version 4.4.0
1717
dotnet add package Microsoft.AppCenter.Crashes --version 4.4.0
1818
```
19+
-
20+
- import AppCenter SDK on program.cs
21+
```csharp
22+
// Microsoft AppCenter SDK
23+
using Microsoft.AppCenter;
24+
using Microsoft.AppCenter.Analytics;
25+
using Microsoft.AppCenter.Crashes;
26+
```
27+
1928
- init the SDK on program.cs like the example on this project
2029
```csharp
2130
static void Main()
2231
{
23-
// do not store the app secret on source code
24-
// this is only for demo purposes
25-
AppCenter.Start("{Your App Secret}", typeof(Analytics), typeof(Crashes));
32+
// you can check more about App Center SDK at
33+
// https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/wpf-winforms
34+
// do not store the app secret on source code
35+
// this is only for demo purposes
36+
System.Console.WriteLine("App Center Powered.");
37+
AppCenter.Start("{Your App Secret}", typeof(Analytics), typeof(Crashes));
2638
}
2739
```

csharp/Program.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
namespace csharp;
22

3+
// Microsoft AppCenter SDK
34
using Microsoft.AppCenter;
45
using Microsoft.AppCenter.Analytics;
56
using Microsoft.AppCenter.Crashes;
7+
68
static class Program
79
{
810
/// <summary>
@@ -11,8 +13,11 @@ static class Program
1113
[STAThread]
1214
static void Main()
1315
{
16+
// you can check more about App Center SDK at
17+
// https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/wpf-winforms
1418
// do not store the app secret on source code
1519
// this is only for demo purposes
20+
System.Console.WriteLine("App Center Powered.");
1621
AppCenter.Start("{Your App Secret}", typeof(Analytics), typeof(Crashes));
17-
}
22+
}
1823
}

0 commit comments

Comments
 (0)