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

DeleteInstanceAssociation() public method

public DeleteInstanceAssociation ( System.Guid instanceKey ) : void
instanceKey System.Guid
return void
        public void DeleteInstanceAssociation(Guid instanceKey)
        {
            try
            {
                String[] files = Directory.GetFiles(_dataDirectory, String.Format("Key.*.{0}.xml", instanceKey));
                if(files.Length > 0)
                {
                    foreach(String file in files)
                    {
                        File.Delete(file);
                    }
                }
            }
            catch(Exception exception)
            {
                Dev2Logger.Log.Error(exception);
                throw new InstancePersistenceException(exception.Message, exception);
            }
        }