Dev2.DynamicServices.FileSystemInstanceStoreIO.DeleteInstance C# (CSharp) Method

DeleteInstance() public method

public DeleteInstance ( System.Guid instanceId ) : void
instanceId System.Guid
return void
        public void DeleteInstance(Guid instanceId)
        {
            String fileName = String.Format("{0}.xml", instanceId);
            String fullPath = Path.Combine(_dataDirectory, fileName);

            lock(fullPath)
            {
                if(File.Exists(fullPath))
                {
                    File.Delete(fullPath);
                }
            }


            fileName = String.Format("{0}.meta.xml", instanceId);
            fullPath = Path.Combine(_dataDirectory, fileName);

            lock(fileName)
            {
                if(File.Exists(fullPath))
                {
                    File.Delete(fullPath);
                }
            }

        }