Create BaseRef.cs

IsValid is correct, Decode is not.