//--- Methods --- public ModuleNode Parse(YamlDotNet.Core.IParser yamlParser) { // parse YAML file into module AST try { return(new DeserializerBuilder() .WithNamingConvention(new PascalCaseNamingConvention()) .WithNodeDeserializer(new CloudFormationFunctionNodeDeserializer()) .WithCloudFormationFunctions() .Build() .Deserialize <ModuleNode>(yamlParser)); } catch (Exception e) { AddError($"parse error: {e.Message}", e); return(null); } }
// Yaml から変換する void IYamlConvertible.Read(YamlDotNet.Core.IParser parser, Type expectedType, ObjectDeserializer nestedObjectDeserializer) { var vpath = (string)nestedObjectDeserializer(typeof(string)); this._初期化(vpath); }