Instruct the decoder wich constructor to use when decoding a object. It can also be used in a public static method instead in a constructor. That attribute can only be used once per class. More...
Instruct the decoder wich constructor to use when decoding a object. It can also be used in a public static method instead in a constructor. That attribute can only be used once per class.
class Product { public string Description { get; set; } public double Price { get; set; }
[FaunaConstructor] public Product(string description, double price) { Description = description; Price = price; } }
class Order { public string Number { get; set; } public List<Product> Products { get; set; }
[FaunaConstructor] public static Order CreateOrder(string number, List<Product> products) { return new Order { Number = number, Products = products } } }
Definition at line 181 of file Attributes.cs.