SpaceAllocation enc.IEncodable <SpaceAllocation> .Decode(enc.IDecoder decoder) { switch (decoder.GetUnionName()) { case "individual": var individual = new IndividualSpaceAllocation(); return(new Individual(((enc.IEncodable <IndividualSpaceAllocation>)individual).Decode(decoder))); case "team": var team = new TeamSpaceAllocation(); return(new Team(((enc.IEncodable <TeamSpaceAllocation>)team).Decode(decoder))); default: return(Other.Instance); } }
/// <summary> /// <para>Initializes a new instance of the <see cref="Individual" /> class.</para> /// </summary> /// <param name="value">The value</param> public Individual(IndividualSpaceAllocation value) { this.Value = value; }