Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="Team" /> class.</para>
 /// </summary>
 /// <param name="value">The value</param>
 public Team(TeamSpaceAllocation value)
 {
     this.Value = value;
 }