// We require the first element in arguments to be the caller // That simplified the UploadCreate function wrapper, but makes us do a little extra juggling here public static IExcelObservable CreateItem(object[] topicArguments) { var caller = topicArguments[0] as ExcelReference; var functionArguments = topicArguments.Skip(1).ToArray(); var item = new UploadItem(caller, functionArguments); UploadItems.Add(item); Debug.Print($"CreateItem: {item.Caller}, Arguments: {topicArguments.Length - 1}"); return(item); }
internal static void NotifyDispose(UploadItem uploadItem) { UploadItems.Remove(uploadItem); Debug.Print($"RemoveItem: {uploadItem.Caller} - Status: {uploadItem.Status}"); }