Ejemplo n.º 1
0
        private SentryEvent CreateSentryEvent(Exception ex, string message)
        {
            var sentryEvent = new SentryEvent(ex);

            sentryEvent.Tags.Add("OS", _appInfoService.GetPlatform());
            sentryEvent.Tags.Add("Login", BasePresenter.User.Login);
            sentryEvent.Tags.Add("AppVersion", _appInfoService.GetAppVersion());
            sentryEvent.Tags.Add("AppBuild", _appInfoService.GetBuildVersion());
            sentryEvent.Tags.Add("Model", _appInfoService.GetModel());
            sentryEvent.Tags.Add("OsVersion", _appInfoService.GetOsVersion());
            sentryEvent.Message = message;
            return(sentryEvent);
        }
Ejemplo n.º 2
0
        private JsonPacket GetPacket()
        {
            var login = AppSettings.User?.Login;

            if (string.IsNullOrEmpty(login))
            {
                login = "******";
            }

            var appVersion   = _appInfoService.GetAppVersion();
            var buildVersion = _appInfoService.GetBuildVersion();

            return(new JsonPacket
            {
                Project = _dsn.ProjectID,
                Tags = new Dictionary <string, string>()
                {
                    { "OS", _appInfoService.GetPlatform() },
                    { "AppVersion", appVersion },
                    { "AppBuild", buildVersion },
                    { "Model", _appInfoService.GetModel() },
                    { "OsVersion", _appInfoService.GetOsVersion() },
                },
                User = new SentryUser(login),
                Release = $"{appVersion}.{buildVersion}"
            });
        }
 public CreateCommentModel(UserInfo user, string parentUrl, string body, IAppInfo appInfo) : base(user)
 {
     IsNeedRewards = user.IsNeedRewards;
     ParentUrl     = parentUrl;
     Body          = body;
     JsonMetadata  = $"{{\"app\": \"steepshot/v{appInfo.GetAppVersion()} b{appInfo.GetBuildVersion()} t\"}}";
 }
 public CreateOrEditCommentModel(UserInfo user, Post parentPost, Post post, string body, IAppInfo appInfo)
     : base(user, parentPost, post.Permlink, string.Empty, body, $"{{\"app\": \"steepshot/v{appInfo.GetAppVersion()} b{appInfo.GetBuildVersion()} t\", \"device\":\"{appInfo.GetModel()}\"}}")
 {
     IsEditMode = true;
 }
 public CreateOrEditCommentModel(UserInfo user, Post parentPost, string body, IAppInfo appInfo)
     : base(user, parentPost, OperationHelper.CreateReplyPermlink(user.Login, parentPost.Author, parentPost.Permlink), string.Empty, body, $"{{\"app\": \"steepshot/v{appInfo.GetAppVersion()} b{appInfo.GetBuildVersion()} t\", \"device\":\"{appInfo.GetModel()}\"}}")
 {
     IsEditMode = false;
 }