#region Provider specific abstract methods
        /// <summary>
        /// Returns an IDbConnection object for the given connection string
        /// </summary>
        /// <param name="connectionString">The connection string to be used to create the connection</param>
        /// <returns>An IDbConnection object</returns>
        /// <exception cref="System.ArgumentNullException">Thrown if connectionString is null</exception>
        public abstract IDbConnection GetConnection(string connectionString);
问题一:翻译下这些注释,猜测下这个连接方法的作用?        /// <summary>
        /// Returns an IDbDataAdapter object
        /// </summary>
        /// <returns>The IDbDataAdapter</returns>
        public abstract IDbDataAdapter GetDataAdapter();
问题二:翻译下这些注释,猜测下这个“数据适配器方法”的作用?        /// <summary>
        /// Calls the CommandBuilder.DeriveParameters method for the specified provider, doing any setup and cleanup necessary
        /// </summary>
        /// <param name="cmd">The IDbCommand referencing the stored procedure from which the parameter information is to be derived. The derived parameters are added to the Parameters collection of the IDbCommand. </param>
        public abstract void DeriveParameters(IDbCommand cmd);
问题三:翻译下这些注释,这是个什么方法,“Derive”何解?猜测下这个“返回参数的方法”的作用?
        /// <summary>
        /// Returns an IDataParameter object
        /// </summary>
        /// <returns>The IDataParameter object</returns>
        public abstract IDataParameter GetParameter();问题四:翻译下这些注释,猜测下这个“返回参数的方法”的作用?另外和“DeriveParameters”有什么不同?        /// <summary>
        /// Execute an IDbCommand (that returns a resultset) against the provided IDbConnection. 
        /// </summary>
        /// <example>
        /// <code>
        /// XmlReader r = helper.ExecuteXmlReader(command);
        /// </code></example>
        /// <param name="cmd">The IDbCommand to execute</param>
        /// <returns>An XmlReader containing the resultset generated by the command</returns>
        /// <exception cref="System.ArgumentNullException">Thrown if command is null.</exception>
        public abstract XmlReader ExecuteXmlReader(IDbCommand cmd);
问题五:翻译下这些注释,猜测下这个“返回XmlReader对象方法”的作用?         /// <summary>
        /// Provider specific code to set up the updating/ed event handlers used by UpdateDataset
        /// </summary>
        /// <param name="dataAdapter">DataAdapter to attach the event handlers to</param>
        /// <param name="rowUpdatingHandler">The handler to be called when a row is updating</param>
        /// <param name="rowUpdatedHandler">The handler to be called when a row is updated</param>
        protected abstract void AddUpdateEventHandlers(IDbDataAdapter dataAdapter, RowUpdatingHandler rowUpdatingHandler, RowUpdatedHandler rowUpdatedHandler);问题六:翻译下这些注释,猜测下这个方法的作用?它是怎样工作的,怎么参数是数据适配器和委托???        /// <summary>
        /// Returns an array of IDataParameters of the specified size
        /// </summary>
        /// <param name="size">size of the array</param>
        /// <returns>The array of IDataParameters</returns>
        protected abstract IDataParameter[] GetDataParameters(int size);
问题七:翻译下这些注释,猜测下这个“返回参数的方法”的作用?另外和上面的“DeriveParameters”和“GetParameter”有什么不同?        /// <summary>
        /// Handle any provider-specific issues with BLOBs here by "washing" the IDataParameter and returning a new one that is set up appropriately for the provider.
        /// </summary>
        /// <param name="connection">The IDbConnection to use in cleansing the parameter</param>
        /// <param name="p">The parameter before cleansing</param>
        /// <returns>The parameter after it's been cleansed.</returns>
        protected abstract IDataParameter GetBlobParameter(IDbConnection connection, IDataParameter p);
        #endregion
问题八:翻译下这些注释,猜测下这个“返回参数的方法”的作用?另外和上面的“DeriveParameters”、“GetParameter”和“GetDataParameters(int size)”有什么不同?

解决方案 »

  1.   

    问题一:根据指定的连接字符串获取一个连接对象,
    问题二:获取一个DataAdapter


      

  2.   

    1  public abstract IDbConnection GetConnection(string connectionString);
       这个是获取链接字符串啊connectionString2  定义DbDataAdapter适配器 应该是用来fill Dataset的3  Derive翻译是获取后面是Parameter 就是获取参数 4  IDataParameter 应该也是获取参数  上面那个是蛋疼。。这些代码没有具体实现。
    还是看看具体实现里面的 在说吧。。