/// <inheritdoc />
 public void Visit(TDefinition definition, EnumDefinitionType type)
 {
     SetParser(
         definition,
         (name, x) =>
         new IdentifierValueDtoString(
             name,
             @type.Values.FirstOrDefault(
                 v => v.Equals(x.Value, StringComparison.InvariantCultureIgnoreCase)) ??
             throw new NotImplementedException($"Don't know what to do with enum value of {x.Value}")
             ));
 }
Example #2
0
 /// <inheritdoc />
 public void Visit(IDefinition definition, EnumDefinitionType type) => Write(definition, type);
Example #3
0
 /// <inheritdoc />
 public void Visit(IdentifierDefinition definition, EnumDefinitionType type) => AddName(definition);
Example #4
0
 /// <inheritdoc />
 public void Visit(IDefinition definition, EnumDefinitionType type)
 {
     Add(definition, "enum");
 }
Example #5
0
 /// <inheritdoc />
 public void Visit(IDefinition definition, EnumDefinitionType type)
 {
     SetMarshaller(definition);
 }
 /// <inheritdoc />
 public void Visit(IDefinition definition, EnumDefinitionType type)
 {
     UseSimpleMarshaller <string>(definition);
 }
 /// <inheritdoc />
 public void Visit(IdentifierDefinition definition, EnumDefinitionType type)
 {
     Writers[definition.SystemName] = WriteEnum;
 }