internal override BaseScore Clone(string id) { WorldFootballScore copy = new WorldFootballScore(); copy.Id = id; if (String.IsNullOrEmpty(id)) { copy.Id = Tools.GenerateId(); } copy.Name = this.Name; copy.Country = this.Country; copy.Image = this.Image; copy.Parent = this.Parent; copy.League = this.League; copy.Season = this.Season; copy.Kind = this.Kind; copy.TwoLegs = this.TwoLegs; copy.NbTeams = this.NbTeams; copy.Rounds = this.Rounds; copy.Levels = this.Levels; copy.Highlights = this.Highlights; copy.Details = this.Details; copy.LiveConfig = this.LiveConfig; if (this.Range != null) { copy.Range = this.Range.Clone(); } return((BaseScore)copy); }
internal override void ApplySettings(BaseScore score) { WorldFootballScore settings = score as WorldFootballScore; if (settings != null) { this.LiveConfig = settings.LiveConfig; this.Details = settings.Details; this.Levels = settings.Levels; this.Highlights = settings.Highlights; } }
public override bool Merge(BaseScore newBaseScore, ImportOptions option) { WorldFootballScore newScore = newBaseScore as WorldFootballScore; if (newScore == null) { return(false); } bool result = base.Merge(newBaseScore, option); if ((option & ImportOptions.Parsing) == ImportOptions.Parsing) { result |= (String.Compare(this.Country, newScore.Country, true) != 0) || (String.Compare(this.League, newScore.League, true) != 0) || (String.Compare(this.Season, newScore.Season, true) != 0) || (this.NbTeams != newScore.NbTeams) || (this.Rounds != newScore.Rounds) || (this.Kind != newScore.Kind) || (this.TwoLegs != newScore.TwoLegs); this.Country = newScore.Country; this.League = newScore.League; this.Season = newScore.Season; this.NbTeams = newScore.NbTeams; this.Rounds = newScore.Rounds; this.Details = newScore.Details; this.Kind = newScore.Kind; this.TwoLegs = newScore.TwoLegs; } if ((option & ImportOptions.Rules) == ImportOptions.Rules) { result |= (String.Compare(this.Levels, newScore.Levels, true) != 0); this.Levels = newScore.Levels; result = true; } return(result); }