// Use this method to add content to share when you do not want to process the data until the target app actually requests it. // The deferredDataFormatId parameter must be a const value from StandardDataFormats class. // The getDeferredDataAsyncFunc parameter is the function that returns the object you want to share. public void SetDeferredContent(string deferredDataFormatId, Func <Task <object> > getDeferredDataAsyncFunc) { if (string.IsNullOrEmpty(deferredDataFormatId)) { throw new ArgumentException("The Parameter DeferredDataFormatId is null or does not contains any element.", nameof(deferredDataFormatId)); } Items.Add(ShareSourceFeatureItem.FromDeferredContent(deferredDataFormatId, getDeferredDataAsyncFunc)); }
// Use this method to add content to share when you do not want to process the data until the target app actually requests it. // The deferredDataFormatId parameter must be a const value from StandardDataFormats class. // The getDeferredDataAsyncFunc parameter is the function that returns the object you want to share. public void SetDeferredContent(string deferredDataFormatId, Func <Task <object> > getDeferredDataAsyncFunc) { if (string.IsNullOrEmpty(deferredDataFormatId)) { throw new ArgumentException("ExceptionShareSourceFeatureDataDeferredDataFormatIdIsNullOrEmpty".GetLocalized(), nameof(deferredDataFormatId)); } Items.Add(ShareSourceFeatureItem.FromDeferredContent(deferredDataFormatId, getDeferredDataAsyncFunc)); }