private object Constructor(ICrdtEntityCreationContext ctx) { var constructors = InitialClass.GetConstructors(); if (constructors.Length > 1) { throw new InvalidOperationException($"Only a single constructor is allowed on CRDT entities: {InitialClass}"); } return(new EntityConstructorInvoker <ICrdtEntityCreationContext>(constructors[0]).Apply(ctx)); }
static void Main(string[] args) { HttpClient client = new HttpClient(); InitialClass initialClass = new InitialClass(client); initialClass.PrintInitial(); string monitorName = initialClass.Process(); Console.WriteLine("\n\nPlease provide us some details to contact you later"); PatientMonitorCustomer customer = new PatientMonitorCustomer(); customer.monitor = monitorName; CustomerInfo details = new CustomerInfo(client); details.SaveDetails(customer); }