ArcGIS4LocalGovernment.AttributeAssistantEditorExtension.processFeatures C# (CSharp) Метод

processFeatures() приватный Метод

private processFeatures ( List ObjectList, string eventType ) : void
ObjectList List
eventType string
Результат void
        private void processFeatures(List<IObject> ObjectList, string eventType)
        {
            if (ObjectList != null)
            {
                List<IObject> newFeatureList = null;
                List<IObject> changedFeatureList = null;
                List<IObject> changedFeatureGeoList = null;

                try
                {
                    AAState._onStopOperationEvent = false; // SG Jan 2013

                    foreach (IObject inObject in ObjectList)
                    {
                        AAState.WriteLine("#######################################################");
                        AAState.WriteLine(inObject.Class.AliasName + A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorError_13a") + eventType);

                        try
                        {
                            AAState._processCount++;
                            //Set attributes based on the dynamic defaults configuration table
                            bool success = SetDynamicValues(inObject, eventType, out changedFeatureList, out newFeatureList, out changedFeatureGeoList);
                            try
                            {
                                inObject.Store();
                            }
                            catch
                            {

                            }
                            if (!success)
                            {

                                // MessageBox.Show(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorChain9"));
                                return;
                            }
                            else
                            {
                                if (changedFeatureList != null)
                                {
                                    processFeatures(changedFeatureList, "ON_CHANGE");
                                }
                                if (changedFeatureGeoList != null)
                                {
                                    processFeatures(changedFeatureGeoList, "ON_CHANGEGEO");
                                }
                                if (newFeatureList != null)
                                {
                                    processFeatures(newFeatureList, "ON_CREATE");
                                }

                            }
                        }
                        catch
                        {

                        }
                        finally
                        {
                            AAState._processCount--;
                            try
                            {
                                if (changedFeatureList != null)
                                {
                                    changedFeatureList.Clear();
                                }
                            }
                            catch
                            { }
                            changedFeatureList = null;
                            try
                            {
                                if (newFeatureList != null)
                                {
                                    newFeatureList.Clear();
                                }
                            }
                            catch
                            { }
                            newFeatureList = null;

                            try
                            {
                                if (changedFeatureGeoList != null)
                                {
                                    changedFeatureGeoList.Clear();
                                }
                            }
                            catch
                            { }
                            changedFeatureGeoList = null;

                            if (AAState._sw != null)
                            {
                                if (AAState._processCount == 0)
                                {
                                    AAState.WriteLine("#######################################################");
                                    AAState._sw.Flush();

                                }
                            }

                        }

                    }

                }
                catch
                {
                }
                finally
                {
                    try
                    {
                        if (changedFeatureList != null)
                        {
                            changedFeatureList.Clear();
                        }
                    }
                    catch
                    { }
                    changedFeatureList = null;
                    try
                    {
                        if (newFeatureList != null)
                        {
                            newFeatureList.Clear();
                        }
                    }
                    catch
                    { }
                    newFeatureList = null;

                    try
                    {
                        if (changedFeatureGeoList != null)
                        {
                            changedFeatureGeoList.Clear();
                        }
                    }
                    catch
                    { }
                    changedFeatureGeoList = null;
                }
            }
        }