Delete() public method

public Delete ( string url, string userName, string password, string content ) : ResponseEventArgs
url string
userName string
password string
content string
return ResponseEventArgs
Esempio n. 1
0
        //compiler directive to prevent synchronous method
        //from being made available if library is compiled for Silverlight
        public ResponseStatusEventArgs Delete(int overlayID)
        {
            ResponseStatusEventArgs args = new ResponseStatusEventArgs();
            try
            {
                GeoComWebClient request = new GeoComWebClient();
                string url = String.Format("{0}/datasets/{1}.json", EndpointURI, overlayID);
                setCredentials(request);

                //validateFileType(files);
                ResponseEventArgs response = request.Delete(url, UserName, Password, "application/json");

                args._result = response.Status;
                //args._location = response.Location;
            }
            catch
            {
            }
            return args;
        }
Esempio n. 2
0
 public ResponseStatusEventArgs deleteMap(int mapid)
 {
     ResponseStatusEventArgs args = new ResponseStatusEventArgs();
     try
     {
         GeoComWebClient request = new GeoComWebClient();
         string url = String.Format("{0}/maps/{1}.json", EndpointURI, mapid);
         var result = request.Delete(url, UserName, Password, "application/json");
         args._result = result.Status;
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return args;
 }