public virtual object Clone() { var newFeatureType = new FeatureType(Name); foreach (var attribute in _attributes) newFeatureType.AddAttributes(attribute.Name, attribute.Type); return newFeatureType; }
public override FeatureType GetFeatureType() { var featureType = new FeatureType(Name); var cmd = _cmd ?? (_cmd = GetOrCreateCommand(Connection)); using (var reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly)) { var fieldCount = reader.FieldCount; for (int i = 0; i < fieldCount; i++) featureType.AddAttributes(reader.GetName(i), reader.GetFieldType(i)); } return featureType; }