public void Implicit_ToGuid() { var expected = new SentryId(Guid.NewGuid()); Guid actual = expected; Assert.Equal(expected.ToString(), actual.ToString("N")); }
public void ToString_Equal_GuidToStringN() { var expected = Guid.NewGuid(); SentryId actual = expected; Assert.Equal(expected.ToString("N"), actual.ToString()); }
public static string SendException(Exception exception) { #if !DEBUG string pluginDiretoryKey = nameof(Plugin.PluginPair.Metadata.PluginDirectory); if (exception.Data.Contains(pluginDiretoryKey)) { string pluginDirectory = exception.Data[pluginDiretoryKey] as string; bool debug = pluginDirectory.Contains(@"\Output\Release") || pluginDirectory.Contains(@"\Output\Release"); bool thirdParty = !pluginDirectory.Contains(Constant.ProgramDirectory); if (debug || thirdParty) { return(SentryId.Empty.ToString()); } } SentryId id = SentryId.Empty; SentrySdk.WithScope(scope => { scope.Level = SentryLevel.Fatal; id = SentrySdk.CaptureException(exception); }); return(id.ToString()); #else return(SentryId.Empty.ToString()); #endif }