コード例 #1
0
        public async Task <int> SaveReferringSite(MobileReferringSiteModel referringSiteModel, string repositoryUrl)
        {
            var databaseConnection = await GetDatabaseConnection <MobileReferringSitesDatabaseModel>().ConfigureAwait(false);

            var referringSitesDatabaseModel = MobileReferringSitesDatabaseModel.ToReferringSitesDatabaseModel(referringSiteModel, repositoryUrl);

            return(await databaseConnection.InsertOrReplaceAsync(referringSitesDatabaseModel).ConfigureAwait(false));
        }
コード例 #2
0
                public CardView(MobileReferringSiteModel mobileReferringSite)
                {
                    RowSpacing     = 0;
                    RowDefinitions = Rows.Define(
                        (Row.TopPadding, AbsoluteGridLength(TopPadding)),
                        (Row.Card, StarGridLength(1)),
                        (Row.BottomPadding, AbsoluteGridLength(BottomPadding)));

                    ColumnDefinitions = Columns.Define(
                        (Column.LeftPadding, AbsoluteGridLength(16)),
                        (Column.Card, StarGridLength(1)),
                        (Column.RightPadding, AbsoluteGridLength(16)));

                    Children.Add(new CardViewFrame(mobileReferringSite).Row(Row.Card).Column(Column.Card));

                    this.DynamicResource(BackgroundColorProperty, nameof(BaseTheme.PageBackgroundColor));
                }
コード例 #3
0
 public static MobileReferringSitesDatabaseModel ToReferringSitesDatabaseModel(MobileReferringSiteModel referringSiteModel, string repositoryUrl)
 {
     return(new MobileReferringSitesDatabaseModel
     {
         FavIconImageUrl = referringSiteModel.FavIconImageUrl,
         DownloadedAt = referringSiteModel.DownloadedAt,
         RepositoryUrl = repositoryUrl,
         Referrer = referringSiteModel.Referrer,
         TotalUniqueCount = referringSiteModel.TotalUniqueCount,
         IsReferrerUriValid = referringSiteModel.IsReferrerUriValid,
         ReferrerUri = referringSiteModel.ReferrerUri,
         TotalCount = referringSiteModel.TotalCount
     });
 }
コード例 #4
0
 public ReferringSitesDataTemplate(MobileReferringSiteModel mobileReferringSite) : base(() => new CardView(mobileReferringSite))
 {
 }
コード例 #5
0
 public ReferringSitesDataTemplate(MobileReferringSiteModel referringSiteModel) : base(() => CreateReferringSitesDataTemplate(referringSiteModel))
 {
 }