コード例 #1
0
 public static StoreInfoData Create(StoreNumber storeNumber)
 {
     return(new StoreInfoData
     {
         LocationId = new LocationId
         {
             StoreNumber = storeNumber.Store,
             SatelliteNumber = storeNumber.Satellite,
             IsRestricted = true
         },
         Address = new Address
         {
             Address1 = $"{storeNumber}addr1",
             Address2 = $"{storeNumber}addr2",
             Address3 = $"{storeNumber}addr3",
             City = $"{storeNumber}city1",
             CountryCode = $"{storeNumber}us",
             CountryCode3 = $"{storeNumber}us3",
             PostalCode = $"{storeNumber}12345",
             StateProvCode = $"{storeNumber}ny"
         },
         Geo = new Geo
         {
             CurrentUtcOffset = 5,
             Latitude = 34,
             Longitude = 67,
             TimeZoneId = $"{storeNumber}GMT"
         },
         ListingNumber = 12,
         CateringUrl = $"{storeNumber}the catering",
         OrderingUrl = $"{storeNumber}the ordering"
     });
 }
コード例 #2
0
 public static StoreInfo Create(StoreNumber storeNumber) => new StoreInfo
 {
     StoreNumber      = storeNumber,
     Address1         = $"{storeNumber}addr1",
     Address2         = $"{storeNumber}addr2",
     Address3         = $"{storeNumber}addr3",
     CateringUrl      = $"{storeNumber}the catering",
     City             = $"{storeNumber}the city",
     CountryCode      = $"{storeNumber}us",
     CountryCode3     = $"{storeNumber}usa",
     CurrentUtcOffset = 5,
     IsRestricted     = true,
     Latitude         = 12,
     Longitude        = 16,
     OrderingUrl      = $"{storeNumber}the ordering",
     PostalCode       = $"{storeNumber}12345",
     State            = $"{storeNumber}fl",
     TimeZoneId       = $"{storeNumber}EST"
 };
コード例 #3
0
ファイル: Customer.cs プロジェクト: JohnCaveson/.NET
 /// <summary>
 /// Returns a <see cref="System.String" /> that represents this instance.
 /// </summary>
 /// <returns>
 /// A <see cref="System.String" /> that represents this instance.
 /// </returns>
 public override string ToString()
 {
     return(StoreNumber.ToString());
 }
コード例 #4
0
        public void CanBeImplicitlyBuiltOutOfAString()
        {
            StoreNumber sn = "111111-1";

            sn.Should().Be(new StoreNumber(111111, 1));
        }
コード例 #5
0
 public void PreventFuturePersistence(StoreNumber storeNumber) => _cacheWithExpiration.Add(storeNumber.ToString(), _expirationMs);
コード例 #6
0
 public bool WasPersistedRecently(StoreNumber storeNumber) => _cacheWithExpiration.Contains(storeNumber.ToString());