예제 #1
0
 private static bool IsSheetRowValid(GoogleSheetRow row)
 {
     return(row.Count > 0 &&
            !string.IsNullOrEmpty(row.Item(0)) &&
            !string.IsNullOrEmpty(row.Item(1)) &&
            !string.IsNullOrEmpty(row.Item(6)));
 }
예제 #2
0
 private static BlogPost BuildBlogPostFromRow(GoogleSheetRow r)
 {
     return(new BlogPost()
     {
         Title = r.Item(0),
         Mission = r.Item(3),
         TargetPublicationDate = r.ItemAsDate(4)
     });
 }
예제 #3
0
 private BlogPost MakePostFromGoogleSheetRow(GoogleSheetRow row)
 {
     return(new BlogPost()
     {
         Blog = new Blog()
         {
             CompanyName = row.Item(0)
         },
         Title = row.Item(1),
         Mission = row.Item(4),
         Author = new Author()
         {
             FirstName = row.Item(5)
         },
         DraftDate = row.ItemAsDate(6),
         TargetFinalizeDate = row.ItemAsDate(7),
         TargetPublicationDate = row.ItemAsDate(8),
         Keyword = row.Item(9),
         IsApproved = row.ItemAsBool(17),
         IsDoublePost = row.ItemAsBool(18)
     });
 }