AnsweredAssumed Answered

How do I convert a GPFeatureRecordSetLayer Feature Set to a Feature Class?

Question asked by reneecammarere on Aug 6, 2013
Latest reply on Aug 12, 2013 by reneecammarere
I have C# code to run a geoprocessing package that produces an output which is stored in a GPFeatureRecordSetLayer.  Right now I have code that displays the result on the GUI when the job is complete . . .

       private void _localGPService_JobCompleted(object sender, JobInfoEventArgs e)
            ESRI.ArcGIS.Client.Tasks.Geoprocessor geoprocessorTask = sender as ESRI.ArcGIS.Client.Tasks.Geoprocessor;
            geoprocessorTask.GetResultDataCompleted += _localGPService_GetResultDataCompleted;
            geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "Output_Areas");

        private void _localGPService_GetResultDataCompleted(object sender, GPParameterEventArgs e)

            ESRI.ArcGIS.Client.Tasks.GPFeatureRecordSetLayer gpLayer = e.Parameter as ESRI.ArcGIS.Client.Tasks.GPFeatureRecordSetLayer;
            foreach (Graphic graphic in gpLayer.FeatureSet.Features)
//  Code to add graphic to map
                graphic.Symbol = this.Resources["InputPolygonSymbol"] as ESRI.ArcGIS.Client.Symbols.SimpleFillSymbol;
                graphic.Geometry.SpatialReference = _graphicsLayer.SpatialReference;

What I need to do is to iterate through each graphic and convert the graphic features to an ArcObjects IFeatureClass that I can write to a file geodatabase.  In other words, I want to convert a Runtime object to an ArcObject.