System.Web.Script.Services.LogicalTypeInfo.GetEnumPrototypeDictionary C# (CSharp) Method

GetEnumPrototypeDictionary() static private method

static private GetEnumPrototypeDictionary ( Type type ) : object>.IDictionary
type System.Type
return object>.IDictionary
		static IDictionary <string, object> GetEnumPrototypeDictionary (Type type)
		{
			var ret = new Dictionary <string, object> ();
			string [] names = Enum.GetNames (type);
			Array values = Enum.GetValues (type);
			for (int i = 0; i < names.Length; i++)
				ret.Add (names [i], values.GetValue (i));

			return ret;
		}