public ProcessingDataset(ProcessDatasetName datasetName, FeatureClass featureClass, IProcessingSelection processingSelection = null, IProcessingSymbology processingSymbology = null) { DatasetName = datasetName.DatasetName; WhereClause = datasetName.WhereClause; FeatureClass = featureClass ?? throw new ArgumentNullException(nameof(featureClass)); Selection = processingSelection ?? new NoProcessingSelection(); Symbology = processingSymbology ?? new NoProcessingSymbology(); var definition = FeatureClass.GetDefinition(); // bombs on joined FC ShapeType = definition.GetShapeType(); // MCT ShapeFieldName = definition.GetShapeField(); // MCT SpatialReference = definition.GetSpatialReference(); // MCT XYTolerance = SpatialReference.XYTolerance; }
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is ProcessDatasetName datasetName) { return(datasetName); } var text = Convert.ToString(value); if (!string.IsNullOrEmpty(text)) { return(ProcessDatasetName.Parse(text)); } return(base.ConvertFrom(context, culture, value)); }