コード例 #1
0
        /// <summary>
        /// Constructs a new instance based on the <paramref name="pluginCmdStub"/>
        /// </summary>
        /// <param name="pluginCmdStub">Will be used to forward calls to. Must not be null.</param>
#pragma warning disable CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.
        public VstPluginCommandAdapter(Plugin.IVstPluginCommandStub pluginCmdStub)
#pragma warning restore CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.
        {
            Throw.IfArgumentIsNull(pluginCmdStub, nameof(pluginCmdStub));

            _pluginCmdStub = pluginCmdStub;
        }
コード例 #2
0
        /// <summary>
        /// A factory method to create the correct <see cref="VstPluginCommandAdapter"/> class type.
        /// </summary>
        /// <param name="pluginCmdStub">A reference to the plugin command stub. Must not be null.</param>
        /// <returns>Returns an instance of <see cref="Deprecated.VstPluginCommandDeprecatedAdapter"/> when the <paramref name="pluginCmdStub"/> supports deprecated methods.</returns>
        public static VstPluginCommandAdapter Create(Plugin.IVstPluginCommandStub pluginCmdStub)
        {
            if (pluginCmdStub is Deprecated.IVstPluginCommandsDeprecated20)
            {
                return(new Deprecated.VstPluginCommandDeprecatedAdapter(pluginCmdStub));
            }

            return(new VstPluginCommandAdapter(pluginCmdStub));
        }
コード例 #3
0
        /// <summary>
        /// Constructs a new instance based on the <paramref name="pluginCmdStub"/>
        /// </summary>
        /// <param name="pluginCmdStub">Will be used to forward calls to. Must not be null.</param>
        public VstPluginCommandAdapter(Plugin.IVstPluginCommandStub pluginCmdStub)
        {
            Throw.IfArgumentIsNull(pluginCmdStub, "pluginCmdStub");

            _pluginCmdStub = pluginCmdStub;
        }
コード例 #4
0
 /// <summary>
 /// Constructs a new instance on the passed <paramref name="pluginCmdStub"/>.
 /// </summary>
 /// <param name="pluginCmdStub">An implementation of the <see cref="IVstPluginCommandsDeprecated20"/> interface. Must not be null.</param>
 public VstPluginCommandDeprecatedAdapter(Plugin.IVstPluginCommandStub pluginCmdStub)
     : base(pluginCmdStub)
 {
     _deprecatedStub = (IVstPluginCommandsDeprecated20)pluginCmdStub;
 }