BACnet.Ashrae.Recipient.Save C# (CSharp) Method

Save() public static method

public static Save ( IValueSink sink, Recipient value ) : void
sink IValueSink
value Recipient
return void
        public static void Save(IValueSink sink, Recipient value)
        {
            sink.EnterChoice((byte)value.Tag);
            switch(value.Tag)
            {
                case Tags.Device:
                    Value<DeviceWrapper>.Save(sink, (DeviceWrapper)value);
                    break;
                case Tags.Address:
                    Value<AddressWrapper>.Save(sink, (AddressWrapper)value);
                    break;
                default:
                    throw new Exception();
            }
            sink.LeaveChoice();
        }