-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Custom classes that extend a resource with a specified strongly-typed xp require the xp to be assigned in the constructor to enforce the strongly-typed xp. Currently no extended resource class adheres to this, allowing any xp to be used in code.
Prior to making the change to each class, we will need to validate that we don't introduce any data corruption to existing usages of the extended resource class or any instance of the base resource class.
The example provided in ordercloud-dotnet-sdk: Strongly Typed xp:
public class MyUser : User<MyUserXp> (
public MyUser() {
xp = new MyUserXp();
}
)
public class MyUserXp
{
public string Gender { get; set; }
}
var user = new MyUser();
user.xp.Gender = "male"; // strongly typed!
Metadata
Metadata
Assignees
Labels
No labels