AddNewChannelDefinition() public method

Adds a new channel definition to the collection of channel definitions in this data source record.
public AddNewChannelDefinition ( ) : ChannelDefinition
return ChannelDefinition
Esempio n. 1
0
        // Static Methods

        /// <summary>
        /// Creates a new channel definition belonging to the given data source record.
        /// </summary>
        /// <param name="dataSourceRecord">The data source record that the new channel definition belongs to.</param>
        /// <returns>The new channel definition.</returns>
        public static ChannelDefinition CreateChannelDefinition(DataSourceRecord dataSourceRecord)
        {
            ChannelDefinition channelDefinition = dataSourceRecord.AddNewChannelDefinition();

            channelDefinition.Phase            = Phase.None;
            channelDefinition.QuantityMeasured = QuantityMeasured.None;

            CollectionElement physicalStructure = channelDefinition.PhysicalStructure;

            physicalStructure.AddElement(new CollectionElement()
            {
                TagOfElement = SeriesDefinitionsTag
            });

            return(channelDefinition);
        }