Пример #1
0
        public void SetPropertyFromYaml(INetDaemonApp app, PropertyInfo prop, YamlScalarNode sc)
        {
            ReplaceSecretIfExists(sc);
            var scalarValue = sc.ToObject(prop.PropertyType) ??
                              throw new NotSupportedException($"The class {app.GetType().Name} and property {prop.Name} unexpected value {sc.Value} is wrong type");

            // Bind the list to the property
            prop.SetValue(app, scalarValue);
        }