Example #1
0
 public Game(IHubContext <GameHub> hub, Constants constants, Terminology terms)
 {
     _hub       = hub;
     _constants = constants;
     _terms     = terms;
     LoadGame(GameLevel.Level1);
 }
Example #2
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"Id = {(Id == null ? "null" : Id == string.Empty ? "" : Id)}");
     toStringOutput.Add($"Status = {(Status == null ? "null" : Status.ToString())}");
     toStringOutput.Add($"RewardTiers = {(RewardTiers == null ? "null" : $"[{ string.Join(", ", RewardTiers)} ]")}");
     toStringOutput.Add($"ExpirationPolicy = {(ExpirationPolicy == null ? "null" : ExpirationPolicy.ToString())}");
     toStringOutput.Add($"Terminology = {(Terminology == null ? "null" : Terminology.ToString())}");
     toStringOutput.Add($"LocationIds = {(LocationIds == null ? "null" : $"[{ string.Join(", ", LocationIds)} ]")}");
     toStringOutput.Add($"CreatedAt = {(CreatedAt == null ? "null" : CreatedAt == string.Empty ? "" : CreatedAt)}");
     toStringOutput.Add($"UpdatedAt = {(UpdatedAt == null ? "null" : UpdatedAt == string.Empty ? "" : UpdatedAt)}");
     toStringOutput.Add($"AccrualRules = {(AccrualRules == null ? "null" : $"[{ string.Join(", ", AccrualRules)} ]")}");
 }
Example #3
0
        public override int GetHashCode()
        {
            int hashCode = 2031047851;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (Status != null)
            {
                hashCode += Status.GetHashCode();
            }

            if (RewardTiers != null)
            {
                hashCode += RewardTiers.GetHashCode();
            }

            if (ExpirationPolicy != null)
            {
                hashCode += ExpirationPolicy.GetHashCode();
            }

            if (Terminology != null)
            {
                hashCode += Terminology.GetHashCode();
            }

            if (LocationIds != null)
            {
                hashCode += LocationIds.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (UpdatedAt != null)
            {
                hashCode += UpdatedAt.GetHashCode();
            }

            if (AccrualRules != null)
            {
                hashCode += AccrualRules.GetHashCode();
            }

            return(hashCode);
        }
Example #4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is LoyaltyProgram other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((RewardTiers == null && other.RewardTiers == null) || (RewardTiers?.Equals(other.RewardTiers) == true)) &&
                   ((ExpirationPolicy == null && other.ExpirationPolicy == null) || (ExpirationPolicy?.Equals(other.ExpirationPolicy) == true)) &&
                   ((Terminology == null && other.Terminology == null) || (Terminology?.Equals(other.Terminology) == true)) &&
                   ((LocationIds == null && other.LocationIds == null) || (LocationIds?.Equals(other.LocationIds) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)) &&
                   ((AccrualRules == null && other.AccrualRules == null) || (AccrualRules?.Equals(other.AccrualRules) == true)));
        }
Example #5
0
        private void buttonTerminology_Click(object sender, RoutedEventArgs e)
        {
            Terminology Window = new Terminology();

            Window.Show();
        }
Example #6
0
        public void RemoveTerminology(int id)
        {
            Terminology entity = TerminologysRepository.GetById(id);

            TerminologysRepository.Delete(entity);
        }
Example #7
0
 public void UpdateTerminology(Terminology Terminology)
 {
     TerminologysRepository.Update(Terminology);
 }
Example #8
0
 public void CreateTerminology(Terminology Terminology)
 {
     TerminologysRepository.Add(Terminology);
 }