public DatabaseLayerMetadata(IVectorLayer layer)
        {
            if (layer == null)
            {
                throw new ArgumentNullException("layer");
            }

            // we don't want to keep the connection open all the time, so simply grab the necessary data
            Name         = layer.Name;
            GeometryType = layer.ActiveGeometryType;
            NumFeatures  = layer.get_FeatureCount();
            Projection   = layer.Projection;
            Connection   = layer.ConnectionString;
        }
        public DatabaseLayerMetadata(IVectorLayer layer)
        {
            if (layer == null)
            {
                throw new ArgumentNullException("layer");
            }

            Logger.Current.Trace("In DatabaseLayerMetadata");
            // we don't want to keep the connection open all the time, so simply grab the necessary data
            Name = layer.Name;
            Logger.Current.Trace("Name: " + Name);
            GeometryType = layer.ActiveGeometryType;
            Logger.Current.Trace("GeometryType: " + GeometryType);
            NumFeatures = layer.get_FeatureCount();
            Logger.Current.Trace("NumFeatures: " + NumFeatures);
            Projection = layer.Projection;
            Logger.Current.Trace("Projection: " + Projection);
            Connection = layer.ConnectionString;
            Logger.Current.Trace("Connection: " + Connection);
        }