public RegionWithHealthRisk AddRegionWithCases(Region region, NumberOfPeople numCases) { return(new RegionWithHealthRisk() { Id = region, NumCases = numCases }); }
public RegionWithHealthRisk AddRegionWithCases(RegionName region, int day, NumberOfPeople numCases) { return(new RegionWithHealthRisk() { Name = region, Days0to6 = 0, Days7to13 = 0, Days14to20 = 0, Days21to27 = 0 }); }
protected void AddNumberOfPeople(NumberOfPeople value) { if (QueryParameters.ContainsKey(Constants.NumberOfPeopleKey)) { QueryParameters[Constants.NumberOfPeopleKey] = value == NumberOfPeople.None ? value : (NumberOfPeople)QueryParameters[Constants.NumberOfPeopleKey] | value; } else { QueryParameters.Add(Constants.NumberOfPeopleKey, value); } }
/// <summary> /// Override of the equality method. /// </summary> /// <param name="o"></param> /// <returns></returns> public bool Equals(Meals o) { //Check whether the compared object is null. if (ReferenceEquals(o, null)) { return(false); } //Check whether the compared object references the same data. if (ReferenceEquals(this, o)) { return(true); } //Check whether the Meals' properties are equal. return(_id.Equals(o._id) && NumberOfPeople.Equals(o.NumberOfPeople) && Type.Equals(o.Type)); }
public void InsertNumCases(RegionWithHealthRisk region, int day, NumberOfPeople numCases) { if (day < 7) { region.Days0to6 += numCases; } else if (day < 14) { region.Days7to13 += numCases; } else if (day < 21) { region.Days14to20 += numCases; } else { region.Days21to27 += numCases; } }
public SearchImagesEditorial WithNumberOfPeople(NumberOfPeople value) { AddNumberOfPeople(value); return(this); }
public SearchImagesCreative WithNumberOfPeople(NumberOfPeople value) { AddNumberOfPeople(value); return(this); }
public SearchImages WithNumberOfPeople(NumberOfPeople value) { if (QueryParameters.ContainsKey(Constants.NumberOfPeopleKey)) { QueryParameters[Constants.NumberOfPeopleKey] = value == NumberOfPeople.None ? value : (NumberOfPeople) QueryParameters[Constants.NumberOfPeopleKey] | value; } else { QueryParameters.Add(Constants.NumberOfPeopleKey, value); } return this; }
IEditorialImagesSearch IEditorialImagesSearch.WithNumberOfPeople(NumberOfPeople value) { return WithNumberOfPeople(value); }
/// <summary> /// Override of the get hash code method. /// </summary> /// <returns></returns> public override int GetHashCode() { //Calculate the hash code for the GPOPolicy. return(_id.GetHashCode() ^ NumberOfPeople.GetHashCode() ^ Type.GetHashCode()); }
IBlendedImagesSearch IBlendedImagesSearch.WithNumberOfPeople(NumberOfPeople value) { return WithNumberOfPeople(value); }
ICreativeImagesSearch ICreativeImagesSearch.WithNumberOfPeople(NumberOfPeople value) { return WithNumberOfPeople(value); }