コード例 #1
0
 public static User GetContact() => new User
 {
     Id                      = 3,
     UserId                  = Helpers.ContactUserId,
     FirstName               = "Mr.",
     LastName                = "Belvedere",
     Photo                   = FakePhotos.Get().First().AsModel("https://blobs.com/photos/").AsStore(),
     PhotoId                 = 1,
     Location                = FakeLocations.Get().First(),
     EmailUpdates            = true,
     SocialUpdates           = true,
     DisplayName             = "Belvedere",
     Bio                     = "Hey friend",
     ProfileVisibility       = Visibility.Contacts,
     ActivityVisibility      = Visibility.Contacts,
     OriginVisibility        = Visibility.Contacts,
     PlantInfoVisibility     = Visibility.Contacts,
     InventoryItemVisibility = Visibility.Contacts,
     DateCreated             = Helpers.Today.AddDays(Helpers.GetRandom(5) * -1),
     DateModified            = null,
     Contacts                = new List <UserContact>
     {
         new UserContact
         {
             Id            = 1,
             UserId        = 3,
             ContactUserId = 1,
             DateRequested = Helpers.Today,
             DateAccepted  = Helpers.Today
         }
     }
 };
コード例 #2
0
        public static IEnumerable <PlantLocation> Get()
        {
            var plantLocations = new List <PlantLocation>
            {
                new PlantLocation
                {
                    Id          = 1,
                    PlantInfoId = 1,
                    Location    = FakeLocations.Get().First(),
                    LocationId  = 1,
                    Status      = "Native",
                    CreatedBy   = Helpers.UserId,
                    DateCreated = Helpers.Today.AddMonths(-1).AddDays(5)
                }
            };

            return(plantLocations);
        }
コード例 #3
0
 public static User GetPrivate() => new User
 {
     Id                      = 2,
     UserId                  = Helpers.PrivateUserId,
     FirstName               = "Jane",
     LastName                = "Lane",
     Photo                   = FakePhotos.Get().First().AsModel("https://blobs.com/photos/").AsStore(),
     PhotoId                 = 1,
     Location                = FakeLocations.Get().First(),
     EmailUpdates            = true,
     SocialUpdates           = true,
     DisplayName             = "JaneLane",
     Bio                     = "Don't look at me",
     ProfileVisibility       = Visibility.Hidden,
     ActivityVisibility      = Visibility.Hidden,
     OriginVisibility        = Visibility.Hidden,
     PlantInfoVisibility     = Visibility.Hidden,
     InventoryItemVisibility = Visibility.Hidden,
     DateCreated             = Helpers.Today.AddDays(Helpers.GetRandom(5) * -1),
     DateModified            = null
 };
コード例 #4
0
ファイル: FakeOrigins.cs プロジェクト: carlingkirk/emergence
 public static IEnumerable <Origin> Get() => new List <Origin>
 {
     new Origin
     {
         Id          = 1,
         Name        = "Plant Finder - Missouri Botanical Garden",
         Description = "Look up, view a photo and read about the over 7,500 plants which are growing or have been grown in the Kemper Center display " +
                       "gardens (plus selected additions) by scientific name, common name and/or selected plant characteristics.",
         Type          = "Website",
         Uri           = new Uri("http://www.missouribotanicalgarden.org/plantfinder/plantfindersearch.aspx"),
         Authors       = "fred",
         AltExternalId = "44",
         ExternalId    = "222",
         Location      = FakeLocations.Get().First(),
         Visibility    = Visibility.Contacts,
         CreatedBy     = FakeUsers.GetPublic().UserId,
         ModifiedBy    = FakeUsers.GetPublic().UserId,
         DateCreated   = Helpers.Today.AddMonths(-1).AddDays(-5),
         DateModified  = Helpers.Today.AddMonths(-1).AddDays(5),
         User          = FakeUsers.GetPublic()
     },
     new Origin
     {
         Id             = 2,
         ParentOriginId = 3,
         Type           = "Nursery",
         Name           = "Botany Yards",
         Description    = "",
         Authors        = "",
         AltExternalId  = "444",
         ExternalId     = "srtyhs",
         Location       = FakeLocations.Get().First(),
         Visibility     = Visibility.Public,
         CreatedBy      = FakeUsers.GetPublic().UserId,
         ModifiedBy     = null,
         DateCreated    = Helpers.Today.AddMonths(-1).AddDays(5),
         DateModified   = null,
         User           = FakeUsers.GetPublic()
     },
     new Origin
     {
         Id          = 3,
         Type        = "Event",
         Name        = "GNPS Symposium 2020",
         Description = "Our 25th annual Symposium is all about connections between native plants and the fauna that rely upon them. Inspired by the " +
                       "February book release of Nature’s Best Hope: A New Approach to Conservation that Starts in Your Yard from Doug Tallamy, we invite you to " +
                       "be among the first to hear his new message. Growing more native plants to sustain all of nature is more urgent than ever.",
         Uri           = new Uri("https://gnps.org/2020-georgia-native-plant-society-annual-symposium/"),
         Authors       = "linda",
         AltExternalId = "#$%#^",
         ExternalId    = "GGGGGGGGG",
         Location      = FakeLocations.Get().First(),
         Visibility    = Visibility.Hidden,
         CreatedBy     = FakeUsers.GetPublic().UserId,
         ModifiedBy    = FakeUsers.GetPublic().UserId,
         DateCreated   = Helpers.Today.AddMonths(-1).AddDays(-5),
         DateModified  = Helpers.Today.AddMonths(-1).AddDays(5),
         User          = FakeUsers.GetPublic()
     },
     new Origin
     {
         Id             = 4,
         ParentOriginId = 3,
         Type           = "Nursery",
         Name           = "Botany Yards",
         Description    = "",
         Authors        = "",
         AltExternalId  = "444",
         ExternalId     = "srtyhs",
         Location       = FakeLocations.Get().First(),
         Visibility     = Visibility.Inherit,
         CreatedBy      = FakeUsers.GetPrivate().UserId,
         ModifiedBy     = null,
         DateCreated    = Helpers.Today.AddMonths(-1).AddDays(5),
         DateModified   = null,
         User           = FakeUsers.GetPrivate()
     }
 };