123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ToolsClassLibrary
- {
-
-
-
-
- [Serializable]
- public class SocketData<T>
- {
-
-
-
- public string FileKey
- {
- get;
- set;
- }
-
-
-
-
- public Dictionary<string,T> FileData
- {
- get;
- set;
- }
-
-
-
-
-
-
-
- public static SocketData<T> CreateUpdData(string fileName, string[] key, T[] val)
- {
- SocketData<T> date = new SocketData<T>();
- if (key.Length == val.Length)
- {
- date.FileKey = fileName;
- date.FileData = new Dictionary<string, T>();
- for (int i = 0; i < key.Length; i++)
- {
- date.FileData.Add(key[i], val[i]);
- }
- }
- return date;
- }
- }
- }
|