PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/Spss/SpssVariableKeyedCollection.cs

#
C# | 32 lines | 15 code | 3 blank | 14 comment | 0 complexity | 3d960bf360ba0452310a20d5f67403e7 MD5 | raw file
 1//-----------------------------------------------------------------------
 2// <copyright file="SpssVariableKeyedCollection.cs" company="Andrew Arnott">
 3//     Copyright (c) Andrew Arnott. All rights reserved.
 4//     Copyright (c) Brigham Young University
 5//     Copyright (c) Intereffective
 6// </copyright>
 7//-----------------------------------------------------------------------
 8
 9namespace Spss {
10	using System;
11	using System.Collections.Generic;
12	using System.Linq;
13	using System.Text;
14	using System.Collections.ObjectModel;
15
16	internal class SpssVariableKeyedCollection : KeyedCollection<string, SpssVariable> {
17		/// <summary>
18		/// Initializes a new instance of the <see cref="SpssVariableKeyedCollection"/> class.
19		/// </summary>
20		public SpssVariableKeyedCollection()
21			: base(StringComparer.OrdinalIgnoreCase) {
22		}
23
24		/// <summary>
25		/// Gets the key for item.
26		/// </summary>
27		/// <param name="item">The item.</param>
28		protected override string GetKeyForItem(SpssVariable item) {
29			return item.Name;
30		}
31	}
32}