public override void DoWork(Action <string, double> ReportProgress, Action Done) { Parent.Message = "Sending..."; var converter = (Parent as SendLocalComponent)?.Converter; converter?.SetContextDocument(Rhino.RhinoDoc.ActiveDoc); var converted = Utilities.DataTreeToNestedLists(data, converter); var ObjectToSend = new Base(); ObjectToSend["@data"] = converted; sentObjectId = Operations.Send(ObjectToSend).Result; Done(); }
public override void DoWork(Action <string, double> ReportProgress, Action Done) { Parent.Message = "Sending..."; try { var converter = (Parent as SendLocalComponent)?.Converter; converter?.SetContextDocument(Rhino.RhinoDoc.ActiveDoc); var converted = Utilities.DataTreeToNestedLists(data, converter); var ObjectToSend = new Base(); ObjectToSend["@data"] = converted; sentObjectId = Operations.Send(ObjectToSend).Result; } catch (Exception e) { Console.WriteLine(e); RuntimeMessages.Add((GH_RuntimeMessageLevel.Warning, e.Message)); } Done(); }