示例#1
0
        static EnvironmentVariableConverter()
        {
            _converter = new ConvertibleBaseDtoConverter();

            // determine generic Convert method and convert it to non-generic method
            // so it can easily be used from PowerShell
            _methodInfoConvertFromDictionary = typeof(EnvironmentVariableConverter)
                                               .GetMethod
                                               (
                METHOD_NAME_CONVERT_FROM_DICTIONARY,
                BindingFlags.Public | BindingFlags.Static,
                null,
                new [] { typeof(DictionaryParameters), typeof(bool) },
                new ParameterModifier[] { }
                                               );
            Contract.Assert(null != _methodInfoConvertFromDictionary);
        }
        static ConversionKeyConverter()
        {
            _converter = new ConvertibleBaseDtoConverter();

            // determine generic Convert method and convert it to non-generic method
            // so it can easily be used from PowerShell
            _methodInfoConvertFromDictionary = typeof(ConversionKeyConverter)
                                               .GetMethod
                                               (
                nameof(ConversionKeyConverter.Convert),
                BindingFlags.Public | BindingFlags.Static,
                null,
                new [] { typeof(DictionaryParameters), typeof(bool) },
                new ParameterModifier[] { }
                                               );
            Contract.Assert(null != _methodInfoConvertFromDictionary);
        }
 protected ConvertibleBaseDto(IConvertibleBaseDtoConverter converter)
 {
     this.Converter = converter;
 }
示例#4
0
 static DictionaryParametersConverter()
 {
     _converter = new ConvertibleBaseDtoConverter();
 }