예제 #1
0
        /// <summary>
        /// Initializes the persistence manager
        /// </summary>
        /// <remarks>
        /// Note: This is the method, which will be called from all different ways to instantiate a PersistenceManagerBase.
        /// </remarks>
        /// <param name="mapping"></param>
        internal virtual void Init(Mappings mapping)
        {
            this.mappings = mapping;

            ConfigContainer.RegisterInstance(mappings);

            this.ds = new NDODataSet(mappings);                // Each PersistenceManager instance must have it's own DataSet.

            string logPath = AppDomain.CurrentDomain.BaseDirectory;

            if (logPath == null)
            {
                logPath = Path.GetDirectoryName(mapping.FileName);
            }

            this.LogPath = logPath;
        }