Ejemplo n.º 1
0
        /// <summary>
        /// Initialize local ILibsndfileApi and ILibsndfileCommandApi instances. 
        /// </summary>
        /// <param name="api">ILibsndfileApi implementation to use.</param>
        /// <param name="commandApi">ILibsndfileCommandApi implementation to use.</param>
        private void Initialize(ILibsndfileApi api, ILibsndfileCommandApi commandApi)
        {
            if (api == null)
                throw new ArgumentNullException("api");
            if (commandApi == null)
                throw new ArgumentNullException("commandApi");

            m_Api = api;
            Commands = new LibsndfileCommandApi(commandApi);
        }
        /// <summary>
        /// Initialize a new instance of LibsndfileCommandApiNativeWrapper with the <paramref name="api"/> 
        /// and <paramref name="marshaller"/> implementations.
        /// </summary>
        /// <param name="api">LibsndfileApi implementation to use.</param>
        /// <param name="marshaller">LibsndfileMarshaller implementation to use.</param>
        internal LibsndfileCommandApiNativeWrapper(ILibsndfileApi api, ILibsndfileMarshaller marshaller)
        {
            if (api == null)
                throw new ArgumentNullException("api");
            if (marshaller == null)
                throw new ArgumentNullException("marshaller");

            m_Api = api;
            m_Marshaller = marshaller;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialize local ILibsndfileApi and ILibsndfileCommandApi instances.
        /// </summary>
        /// <param name="api">ILibsndfileApi implementation to use.</param>
        /// <param name="commandApi">ILibsndfileCommandApi implementation to use.</param>
        private void Initialize(ILibsndfileApi api, ILibsndfileCommandApi commandApi)
        {
            if (api == null)
            {
                throw new ArgumentNullException("api");
            }
            if (commandApi == null)
            {
                throw new ArgumentNullException("commandApi");
            }

            m_Api    = api;
            Commands = new LibsndfileCommandApi(commandApi);
        }
        /// <summary>
        /// Initialize a new instance of LibsndfileCommandApiNativeWrapper with the <paramref name="api"/>
        /// and <paramref name="marshaller"/> implementations.
        /// </summary>
        /// <param name="api">LibsndfileApi implementation to use.</param>
        /// <param name="marshaller">LibsndfileMarshaller implementation to use.</param>
        internal LibsndfileCommandApiNativeWrapper(ILibsndfileApi api, ILibsndfileMarshaller marshaller)
        {
            if (api == null)
            {
                throw new ArgumentNullException("api");
            }
            if (marshaller == null)
            {
                throw new ArgumentNullException("marshaller");
            }

            m_Api        = api;
            m_Marshaller = marshaller;
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of <c>LibsndfileApi</c> with the <paramref name="api"/> implementation.
 /// </summary>
 /// <param name="api">ILibsndfileApi implementation to use.</param>
 /// <param name="commandApi">ILibsndfileCommandApi implementation to use.</param>
 /// <remarks>
 /// This constructor should only be used for testing when simulating the actual libsndfile library.
 /// </remarks>
 internal LibsndfileApi(ILibsndfileApi api, ILibsndfileCommandApi commandApi)
 {
     Initialize(api, commandApi);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of <see cref="LibsndfileApi"/> with the given <paramref name="api"/> implementation
        /// and default native <see cref="ILibsndfileCommandApi"/> implementation.
        /// </summary>
        /// <param name="api">ILibsndfileApi implementation to use.</param>
        /// <remarks>
        /// This constructor should only be used for testing when simulating the actual libsndfile library.
        /// </remarks>
        internal LibsndfileApi(ILibsndfileApi api)
        {
            var commandApi = new LibsndfileCommandApiNativeWrapper(api, new LibsndfileMarshaller());

            Initialize(api, commandApi);
        }
 /// <summary>
 /// Initialize a new instance of LibsndfileCommandApiNativeWrapper with the <paramref name="api"/> api implementation.
 /// </summary>
 internal LibsndfileCommandApiNativeWrapper(ILibsndfileApi api)
     : this(api, new LibsndfileMarshaller())
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of <c>LibsndfileApi</c> with the <paramref name="api"/> implementation.
 /// </summary>
 /// <param name="api">ILibsndfileApi implementation to use.</param>
 /// <param name="commandApi">ILibsndfileCommandApi implementation to use.</param>
 /// <remarks>
 /// This constructor should only be used for testing when simulating the actual libsndfile library.
 /// </remarks>
 internal LibsndfileApi(ILibsndfileApi api, ILibsndfileCommandApi commandApi)
 {
     Initialize(api, commandApi);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of <see cref="LibsndfileApi"/> with the given <paramref name="api"/> implementation
 /// and default native <see cref="ILibsndfileCommandApi"/> implementation.
 /// </summary>
 /// <param name="api">ILibsndfileApi implementation to use.</param>
 /// <remarks>
 /// This constructor should only be used for testing when simulating the actual libsndfile library.
 /// </remarks>
 internal LibsndfileApi(ILibsndfileApi api)
 {
     var commandApi = new LibsndfileCommandApiNativeWrapper(api, new LibsndfileMarshaller());
     Initialize(api, commandApi);
 }
 /// <summary>
 /// Initialize a new instance of LibsndfileCommandApiNativeWrapper with the <paramref name="api"/> api implementation.
 /// </summary>
 internal LibsndfileCommandApiNativeWrapper(ILibsndfileApi api)
     : this(api, new LibsndfileMarshaller())
 {
 }