コード例 #1
0
ファイル: Program.cs プロジェクト: JNickVA1/TeqTankSampleCode
        /// <summary>
        ///
        /// </summary>
        /// <param name="query"></param>
        private static void GetCommandsFromSettings(out IEnumerable <SettingsProperty> query)
        {
            //
            var numSettingsProperties = Settings.Default.Properties.Count;

            //
            Array appSettingsPropertyArray = new SettingsProperty[numSettingsProperties];

            Settings.Default.Properties.CopyTo(appSettingsPropertyArray, 0);

            //
            var appSettingsProperties = new List <SettingsProperty>();

            //
            for (var i = 0; i < numSettingsProperties; i++)
            {
                appSettingsProperties.Add(appSettingsPropertyArray.GetValue(i) as SettingsProperty);
            }

            //
            query = appSettingsProperties.Where(propertyKey => propertyKey.Name.Contains("Command"));
        }