public static async System.Threading.Tasks.Task <R> MatchAsync <R>(this ISendReplyAuthorAcknowledgementResult self, System.Func <AcknowledgementSent, System.Threading.Tasks.Task <R> > whenAcknowledgementSent, System.Func <AcknowledgementNotSent, System.Threading.Tasks.Task <R> > whenAcknowledgementNotSent) { switch ((self)) { case AcknowledgementSent acknowledgementsent: return(await whenAcknowledgementSent(acknowledgementsent)); case AcknowledgementNotSent acknowledgementnotsent: return(await whenAcknowledgementNotSent(acknowledgementnotsent)); default: throw new System.NotSupportedException("This switch statement should be exhaustive"); } }
public static ISendReplyAuthorAcknowledgementResult Match(this ISendReplyAuthorAcknowledgementResult self, System.Func <AcknowledgementSent, ISendReplyAuthorAcknowledgementResult> whenAcknowledgementSent, System.Func <AcknowledgementNotSent, ISendReplyAuthorAcknowledgementResult> whenAcknowledgementNotSent) { switch ((self)) { case AcknowledgementSent acknowledgementsent: return(whenAcknowledgementSent(acknowledgementsent)); case AcknowledgementNotSent acknowledgementnotsent: return(whenAcknowledgementNotSent(acknowledgementnotsent)); default: throw new System.NotSupportedException("This switch statement should be exhaustive"); } }