-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from mausworks/feature/contexts
Contexts support.
- Loading branch information
Showing
13 changed files
with
233 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace Pidget.Client.DataModels | ||
{ | ||
/// <summary> | ||
/// Provides additional contextual data, typically related to the current user. | ||
/// See also: https://docs.sentry.io/clientdev/interfaces/contexts/ | ||
/// </summary> | ||
public class ContextsData : ArbitraryData | ||
{ | ||
public OperatingSystemData OperatingSystem | ||
{ | ||
get => this["os"] as OperatingSystemData; | ||
set => this["os"] = value; | ||
} | ||
|
||
public DeviceData Device | ||
{ | ||
get => this["device"] as DeviceData; | ||
set => this["device"] = value; | ||
} | ||
|
||
public RuntimeData Runtime | ||
{ | ||
get => this["runtime"] as RuntimeData; | ||
set => this["runtime"] = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
namespace Pidget.Client.DataModels | ||
{ | ||
/// <summary> | ||
/// Describes the device that caused an event, | ||
/// most appropriate for mobile applications. | ||
/// </summary> | ||
public class DeviceData : ArbitraryData | ||
{ | ||
public string Name | ||
{ | ||
get => this["name"] as string; | ||
set => this["name"] = value; | ||
} | ||
|
||
public string Family | ||
{ | ||
get => this["family"] as string; | ||
set => this["family"] = value; | ||
} | ||
|
||
public string Model | ||
{ | ||
get => this["model"] as string; | ||
set => this["model"] = value; | ||
} | ||
|
||
public string ModelId | ||
{ | ||
get => this["model_id"] as string; | ||
set => this["model_id"] = value; | ||
} | ||
|
||
public string Architecture | ||
{ | ||
get => this["arch"] as string; | ||
set => this["arch"] = value; | ||
} | ||
|
||
public double? BatteryLevel | ||
{ | ||
get => this["arch"] as double?; | ||
set => this["battery_level"] = value; | ||
} | ||
|
||
public string Orientation | ||
{ | ||
get => this["orientation"] as string; | ||
set => this["orientation"] = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
namespace Pidget.Client.DataModels | ||
{ | ||
/// <summary> | ||
/// Defines the operating system that caused an event. | ||
/// </summary> | ||
public class OperatingSystemData : ArbitraryData | ||
{ | ||
public string Name | ||
{ | ||
get => this["name"] as string; | ||
set => this["name"] = value; | ||
} | ||
|
||
public string Version | ||
{ | ||
get => this["version"] as string; | ||
set => this["version"] = value; | ||
} | ||
|
||
public string Build | ||
{ | ||
get => this["build"] as string; | ||
set => this["build"] = value; | ||
} | ||
|
||
public string KernelVersion | ||
{ | ||
get => this["kernel_version"] as string; | ||
set => this["kernel_version"] = value; | ||
} | ||
|
||
public bool? Rooted | ||
{ | ||
get => this["rooted"] as bool?; | ||
set => this["rooted"] = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Pidget.Client.DataModels | ||
{ | ||
/// <summary> | ||
/// Describes the runtime in more detail. | ||
/// </summary> | ||
public class RuntimeData : ArbitraryData | ||
{ | ||
public string Name | ||
{ | ||
get => this["name"] as string; | ||
set => this["name"] = value; | ||
} | ||
|
||
public string Version | ||
{ | ||
get => this["version"] as string; | ||
set => this["version"] = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.