I have never used delegates before and I am totally lost in the documentation.
Here is my code:
public static void DownloadAssetGroups()
IBaseRepository repository = (activity.Application as AssetManagerApplication).AssetGroupRepository;
private static void PerformReceiveOnRepository(IBaseRepository repository)
ManualResetEvent manualResetEvent = new ManualResetEvent(false);
ReceiveStatusResult statusResult = new ReceiveStatusResult();
ThreadPool.QueueUserWorkItem((s) => ReceiveClass.Receive(manualResetEvent, activity, repository, statusResult));
if (statusResult.Error) showError(statusResult);
resultToastMessage += (activity.Application as AssetManagerApplication).AssetGroupRepository.GetObjectTypeClassDisplayNamePlural() + " Downloaded " + statusResult.DownloadCount.ToString() + " New " + statusResult.NewCount.ToString() + " Modified " + statusResult.ModifiedCount.ToString() + "" + System.Environment.NewLine + System.Environment.NewLine;
Basically I call DownloadAssetGroups() which calls PerformReceiveOnRepository
However, at the end of the repository I want to call another method, on the line I've commented on that says // nextMethod(), I want to pass the nextMethod into the PerformReceiveOnRepository
Can anybody help?