Aliase for type parameters
See original GitHub issueI use my xml file as configuration file for the end user. It would be great if I could specify aliases for types. So that the user could do sth like
<AlbedoColor type="Color">
<R>156</R>
<G>208</G>
<B>84</B>
<A>255</A>
</AlbedoColor>
Instead of
<AlbedoColor type="OpenTK.Graphics.Color4">
<R>156</R>
<G>208</G>
<B>84</B>
<A>255</A>
</AlbedoColor>
Issue Analytics
- State:
- Created 7 years ago
- Comments:37 (27 by maintainers)
Top Results From Across the Web
Type aliases requiring type parameters · Issue #1616
I don't think so. The issue is that the any use of a type alias is always equivalent to a thing that we...
Read more >Is it possible to create a type alias for multiple parameters ...
You can make a type object that is an alias for the type arguments passed into the templated function. It evaluates to undefined...
Read more >Type aliases & function types | Academy
Type aliases. Create your own custom types using the "type" keyword, understand the "void" type, and learn how to write custom function types....
Read more >PEP 695 – Type Parameter Syntax
This PEP specifies an improved syntax for specifying type parameters within a generic class, function, or type alias.
Read more >Creating type aliases - Learn TypeScript
The syntax for creating a type alias ... type TypeAliasName = ExistingType;. So, the type keyword is placed before the chosen name for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Version 1.5.0 supports XmlRootAttribute and XmlElementAttribute. In these attributes you can change name.
XmlElement attribute
Xml will be look like:
And XmlRoot attribute:
Xml will be look like:
Currently in v2, these xmls will look like:
XmlElementAttribute has counterpart in configuration:
XmlRoot attribute doesn’t have counterpart in configuration. @Mike-EEE Do you think (like me) that it is the same function. If yes we should add
cfg.ConfigType<Color4>().Name("Color");
instead ofcfg.ConfigType<Color4>().Alias("Color");
Haha, great 😆 🎉