Candy.Updater.UpdateArgs.UpdateArgs C# (CSharp) Method

UpdateArgs() static private method

static private UpdateArgs ( ) : System.Collections.Generic
return System.Collections.Generic
        static UpdateArgs()
        {
            var properties = typeof(UpdateArgs).GetProperties();
            // n -> ApplicationName, name -> ApplicationName, p -> ApplicationPath ... のような辞書に変換
            _propertyDic = properties.SelectMany(x => x.GetCustomAttribute<CommandLineArgsAttribute>().Maybe(_ => _.Keys) ?? Enumerable.Empty<string>(),
                                                 (property, key) => new { key, property, })
                                     .ToDictionary(x => x.key, x => x.property);
        }