Author: gbayon
Date: Mon Mar 17 12:05:29 2008
New Revision: 638025

URL: http://svn.apache.org/viewvc?rev=638025&view=rev
Log:
Add settable possibility of DataSource on the ISessionFactory so user can plug 
their own dataSource

Modified:
    
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/DefaultSessionFactory.cs
    ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/ISessionFactory.cs

Modified: 
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/DefaultSessionFactory.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/DefaultSessionFactory.cs?rev=638025&r1=638024&r2=638025&view=diff
==============================================================================
--- 
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/DefaultSessionFactory.cs
 (original)
+++ 
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/DefaultSessionFactory.cs
 Mon Mar 17 12:05:29 2008
@@ -39,7 +39,7 @@
     public class DefaultSessionFactory : ISessionFactory
     {
         [NonSerialized]
-        private readonly IDataSource dataSource = null;
+        private IDataSource dataSource = null;
         [NonSerialized]
         private readonly ISessionStore sessionStore = null;
         private readonly ITransactionManager transactionManager = null;
@@ -67,9 +67,10 @@
         /// Gets the data source.
         /// </summary>
         /// <value>The data source.</value>
-        public IDataSource DataSource
+        public virtual IDataSource DataSource
         {
             get { return dataSource; }
+            set { dataSource = value; }
         }
 
 

Modified: 
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/ISessionFactory.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/ISessionFactory.cs?rev=638025&r1=638024&r2=638025&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/ISessionFactory.cs 
(original)
+++ ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper/Session/ISessionFactory.cs 
Mon Mar 17 12:05:29 2008
@@ -34,11 +34,12 @@
     /// </summary>
     public interface ISessionFactory 
     {
+
         /// <summary>
-        /// Gets the data source.
+        /// Gets or sets the data source.
         /// </summary>
         /// <value>The data source.</value>
-        IDataSource DataSource { get; }
+        IDataSource DataSource { set; get; }
 
         /// <summary>
         /// Open a <c>ISession</c> on the given connection


Reply via email to