var client = new BFSServiceReference.bfsapiSoapClient();
var credentials = new BFSServiceReference.Credentials()
{
UserName = bfsusername, //Username of administrative user in your instance of BFS
Password = bfspassword, //Password of the administrative user in your instance of BFS
};
Guid oG = new Guid("39bc0ada-3c40-4866-81cd-04bbc77b998b"); //previously fetched
DeleteFileRequest oReq = new DeleteFileRequest();
oReq.Credentials = credentials;
oReq.identify = Identify; //Unique token to identify
oReq.FileInfoDelete = new FileInfoGeneral
{
BrickId = oG
};
DeleteFileResponse oRep = client.DeleteFile(oReq);
if (oRep.Message=="OK")
{
Console.Writeline("File deleted successfully");
}
else
{
Console.Writeline(string.format("Delete of file not successful: {0}", Rep.Message));
} |