/// <summary> /// 指定された項目のデータリストを取得します。 /// </summary> /// <param name="itemKinds"></param> /// <returns></returns> public List<string> ToArray(FolderWatcherSetting.FileItemKind[] itemKinds) { List<String> itemDatas = new List<string>(); Type typeFileInfo = this.GetType(); foreach (FolderWatcherSetting.FileItemKind itemKind in itemKinds) { PropertyInfo pi = typeFileInfo.GetProperty(itemKind.ToString()); if (pi != null) { // プロパティのゲッターの呼び出し // 以下は「newct = fi.CreationTimeUtc;」と同じ意味 object propertyData = pi.GetValue(this, null); if (propertyData == null) { itemDatas.Add(string.Empty); } else { itemDatas.Add(propertyData.ToString()); } } } return itemDatas; }
/// <summary> /// �R���X�g���N�^ /// </summary> static FolderWatcherSetting() { // Utilty�N���X�̂��߃R���X�g���N�^�� private try { instance = FolderWatcherSetting.Load(); } catch { } }