2
Vote

Feature Request: AliasAttribute

description

Used to provide an alias name for a .NET classes/properties used by the xoml loader to deserialize the object tree instead of their .NET names.
 
Example:
<person first-name="John" last-name="Public" /> ==> p = new Person(); p.Firstname = "John"; p.LastName = "Public";
 
[Alias("person")]
public class Person {
[Alias("first-name")]
public string FirstName { get; set; }
...
}
Xaml equivalent: none / unknown
 
Usage: Can be used to deserialize existing xml languages (like xhtml) into an object tree without breaking the .NET naming conventions.
 
Requirements: Resolving alias names without a type cache is really expensive (the current xoml implementation has no type cache). A cache MUST be implemented before this attribute makes sense.

comments