Пример #1
0
        private static RootElement ConvertRootElement(KeySwitch source, ListElement listOfPSoundSlot, ListElement listOfUSlotVisuals)
        {
            // Construction of InstrumentMap element
            var slots       = InstrumentMap.Slots(listOfPSoundSlot);
            var slotVisuals = InstrumentMap.SlotVisuals(listOfUSlotVisuals);

            var instrumentName = $"{source.ProductName.Value} {source.InstrumentName.Value}";
            var rootElement    = InstrumentMap.New(instrumentName);

            rootElement.Member.Add(slotVisuals);
            rootElement.Member.Add(slots);
            rootElement.StringElement.Value = instrumentName;

            return(rootElement);
        }