internal ResultsReturn[] GetResults( Structs.ResultWeaponsClass wclass, Structs.ShootersClass uclass, Structs.Competition competition, bool finalResults) { lock (resultHolders) { foreach (CResultHolder holder in resultHolders) { if (holder.WClass == wclass && holder.UClass == uclass && holder.NorwegianCount == competition.NorwegianCount && holder.FinalResults == finalResults) { return(holder.Results); } } ResultsReturn[] results = result.GetResults(wclass, uclass, competition, finalResults); CResultHolder newHolder = new CResultHolder( wclass, uclass, competition.NorwegianCount, finalResults, results); resultHolders.Add(newHolder); return(results); } }
internal ResultsReturn[] GetResults( Structs.ResultWeaponsClass wclass, Structs.ShootersClass uclass, Structs.Competition competition, bool finalResults) { lock (resultHolders) { foreach (CResultHolder holder in resultHolders) { if (holder.WClass == wclass && holder.UClass == uclass && holder.NorwegianCount == competition.NorwegianCount && holder.FinalResults == finalResults) { return holder.Results; } } ResultsReturn[] results = result.GetResults(wclass, uclass, competition, finalResults); CResultHolder newHolder = new CResultHolder( wclass, uclass, competition.NorwegianCount, finalResults, results); resultHolders.Add(newHolder); return results; } }