示例#1
0
		/// <summary>
		/// Open a PostGIS workspace from a zig file
		/// </summary>
		/// <param name="FileName"></param>
		/// <param name="hWnd"></param>
		/// <returns></returns>
        public IWorkspace OpenFromFile(string FileName, int hWnd)
        {            
            IWorkspace retVal = null;
            try
            {
                // Grab the configuration and immediately setup logging.
                FileInfo fi = new FileInfo(FileName);
                //Abe
				//m_config = new Config(fi);
				m_config = new Config(fi);
                if (config.loggingConfigInfo != null)
                    log4net.Config.XmlConfigurator.Configure(config.loggingConfigInfo);

                // Log stuff.
                log.enterFunc("OpenFromFile");
                if (log.IsDebugEnabled)
                {
                    log.Debug("Logging now setup.");
                    log.Debug(FileName + "," + hWnd.ToString());
                }
                
                PostGisWorkspaceName wksName = new PostGisWorkspaceName(this, config);
                retVal = new PostGisFeatureWorkspace(wksName);
            }
            finally
            {
                log.leaveFunc();
            }
            return retVal;
        }
示例#2
0
 public PostGisFeatureWorkspace(PostGisWorkspaceName PostGisWorkspaceName)
 {
     m_wksName = PostGisWorkspaceName;
 }
示例#3
0
		/// <summary>
		/// Open a PostGIS workspace from ConnectionProperties
		/// (Paolo Corti, january 2007)
		/// </summary>
		/// <param name="ConnectionProperties"></param>
		/// <param name="hWnd"></param>
		/// <returns></returns>
        public IWorkspace Open(IPropertySet ConnectionProperties, int hWnd)
        {
			IWorkspace retVal = null;
			try
			{
				m_config = new Config(ConnectionProperties);
				// immediately setup logging.
				if (config.loggingConfigInfo != null)
					log4net.Config.XmlConfigurator.Configure(config.loggingConfigInfo);

				// Log stuff.
				log.enterFunc("OpenFromConnectionProperties");
				if (log.IsDebugEnabled)
				{
					log.Debug("Logging now setup.");
					log.Debug(hWnd.ToString());
				}

				PostGisWorkspaceName wksName = new PostGisWorkspaceName(this, config);
				retVal = new PostGisFeatureWorkspace(wksName);
			
			}
			finally
			{
				log.leaveFunc();
			}
			return retVal;
        }