public object ESRI_Map_Remove(ResultBuffer rb)
        {
            object result;

            try
            {
                string argument = LspUtil.GetArgument(rb, 0, null);
                if (string.IsNullOrEmpty(argument))
                {
                    result = null;
                }
                else
                {
                    MSCMapService mapService = this.GetMapService(argument);
                    if (mapService == null)
                    {
                        result = null;
                    }
                    else if (mapService.DeleteService())
                    {
                        result = LspUtil.LispTrue;
                    }
                    else
                    {
                        result = null;
                    }
                }
            }
            catch
            {
                result = null;
            }
            return(result);
        }
 private void db_ObjectErased(object sender, ObjectErasedEventArgs e)
 {
     try
     {
         if (e.DBObject.Id == this.RasterObjectId)
         {
             if (base.GetType() == typeof(MSCMapService))
             {
                 MSCMapService mSCMapService = this as MSCMapService;
                 mSCMapService.DeleteService();
             }
             else if (base.GetType() == typeof(MSCImageService))
             {
                 MSCImageService mSCImageService = this as MSCImageService;
                 mSCImageService.DeleteService();
             }
         }
         this.CheckForUpdates();
     }
     catch
     {
         System.Windows.MessageBox.Show("DEBUG:  Catch in MSCRasterService.db_ObjectErased");
     }
 }