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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Clears the bundle from any privacy info file created by Sentry.--> | |
<Target Name="ClearSentryBundleResource" BeforeTargets="PrepareForBuild" Condition="'$(Platform)' == 'iPhone' Or '$(Platform)' == 'iOS' or $(Platform) == 'iPhoneSimulator'"> | |
<Message Importance="high" Text="Target ClearSentryBundleResource $(Platform)"/> | |
<PropertyGroup> | |
<PrivacyInfoFileName>PrivacyInfo.xcprivacy</PrivacyInfoFileName> | |
<SentryTargetEnabled>true</SentryTargetEnabled> | |
</PropertyGroup> |
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
using System; | |
using Sentry; | |
// requires constant __MOBILE__ else SentrySdk isnt partial | |
public static class SentrySdkExtensions | |
{ | |
// Requires SentrySdk to be partial. Otherwise can be called with SentrySdkExtensions.StartTransactionOrChild | |
public static ISpan StartTransactionOrChild(string name, string operation, string description = null) | |
{ |
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
using AC; | |
using Sentry; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[System.Serializable] | |
public class ActionSentryTag : Action | |
{ | |
public enum SentryTagEnum |
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
using AC; | |
using Sentry; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[System.Serializable] | |
public class ActionSentryCaptureMessage : Action | |
{ | |
public override ActionCategory Category { get { return ActionCategory.Custom; } } |
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
using System; | |
using System.Diagnostics; | |
namespace ShiftString | |
{ | |
class Program | |
{ | |
struct Data | |
{ | |
public int leftShift { get; set; } |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
namespace AnagramFinder | |
{ | |
public static class Program | |
{ | |
public static void Main(string[] args) | |
{ |
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
private int _intValue; | |
private decimal _decimalValue; | |
private void SetValue(object target, PropertyInfo prop) | |
{ | |
if (prop.CanWrite) | |
{ | |
if (prop.PropertyType == typeof(int) || prop.PropertyType == typeof(int?)) | |
{ | |
prop.SetValue(target, _intValue++, null); | |
} |
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 function creates a Sentry Request based on HttpResponseMessage | |
public static async Task<Request> ToSentryRequestAsync(this HttpResponseMessage responseMessage) | |
{ | |
var request = new Request(); | |
try | |
{ | |
var response = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); | |
request.Other.Add("server-response", response); | |
} | |
catch |