コード例 #1
0
 public void Remove(SpectralSet set)
 {
     _sets.Remove(set);
     if (!_sets.Any())
     {
         Resolution = null;
     }
 }
コード例 #2
0
 public void Add(SpectralSet set)
 {
     if (set.Resolution != resolution)
     {
         //Throw an Exception here, or however you want to handle invalid data
         _sets.Add(set);
     }
 }
コード例 #3
0
    public void Add(SpectralSet set)
    {
        var resolutionSet = _sets.FirstOrDefault(s => s.Resolution != null);

        if (resolutionSet != null && resolutionSet.Resolution != set.Resolution)
        {
            //Throw the exception here
            _sets.Add(set);
        }
        Resolution = set.Resolution;
    }
コード例 #4
0
 public void Add(SpectralSet set)
 {
     //Do validation here, throw an exception or whatever you want to do if the set isn't valid
     _sets.Add(set);
 }