Esempio n. 1
0
        /// <summary>
        /// Disposes a plugin program.
        /// </summary>
        /// <remarks>Also disposes all <see cref="VstParameter"/> instances in the <see cref="Parameters"/> collection.</remarks>
        public virtual void Dispose()
        {
            _name      = null;
            Categories = null;

            if (_parameters != null)
            {
                _parameters.Clear();    // disposes VstParameter instances
                _parameters = null;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Returns a collection of <see cref="VstParameter"/> instances that all belong
        /// to the specified <paramref name="category"/>.
        /// </summary>
        /// <param name="category">The parameter category. Can be null.</param>
        /// <returns>An empty collection is returned when no parameters could be found that
        /// fall under the specified <paramref name="category"/>. Never returns null.</returns>
        public VstParameterCollection FindParametersIn(VstParameterCategory category)
        {
            VstParameterCollection results = new VstParameterCollection();

            foreach (VstParameter param in this.Items)
            {
                if (param.Info.Category == category)
                {
                    results.Add(param);
                }
            }

            return(results);
        }