FastQuant.Provider.SetProperties C# (CSharp) Méthode

SetProperties() protected méthode

protected SetProperties ( ProviderPropertyList properties ) : void
properties ProviderPropertyList
Résultat void
        protected internal virtual void SetProperties(ProviderPropertyList properties)
        {
            foreach (var p in GetType().GetProperties().Where(p => p.CanRead && p.CanWrite))
            {
                var converter = TypeDescriptor.GetConverter(p.PropertyType);
                if (converter.CanConvertFrom(typeof(string)))
                {
                    var value = properties.GetStringValue(p.Name, null);
                    //if (value != null && converter.IsValid(value))
                    if (value != null)
                        p.SetValue(this, converter.ConvertFromInvariantString(value), null);
                }
            }
        }