Exemplo n.º 1
0
        protected Task ShareRequested(IShareRequest shareRequest)
        {
            if (shareRequest == null)
                throw new ArgumentNullException(nameof(shareRequest));

            return ShareRequestedInternal(shareRequest);
        }
Exemplo n.º 2
0
        public void ConfigureShareRequest(IShareRequest request)
        {
            string url = string.Format("http://prejector.com/{0}/{1}", ApplicationState.InstallId, request.Id);
            var    uri = new Uri(url, UriKind.Absolute);

            request.SetUri(uri);
            request.Title       = request.Id.ToString();
            request.Description = "A sharing event";
        }
Exemplo n.º 3
0
        public void ConfigureShareRequest(IShareRequest request)
        {
            string url = string.Format("http://prejector.com/{0}/{1}", ApplicationState.InstallId, request.Id);
            var uri = new Uri(url, UriKind.Absolute);

            request.SetUri(uri);
            request.Title = request.Id.ToString();
            request.Description = "A sharing event";
        }
Exemplo n.º 4
0
        protected async Task ShareRequestedInternal(IShareRequest shareRequest)
        {
            // Find the first page element that implements IShareable and forward the data request

            PageInfo currentPage = _navigationManager.NavigationStack.CurrentPage;
            bool hasRequestBeenProcessed = false;

            if (currentPage != null)
            {
                foreach (object element in _navigationManager.GetPageElements(currentPage))
                {
                    if (element is IShareable)
                    {
                        await ((IShareable)element).ShareRequested(shareRequest);
                        hasRequestBeenProcessed = true;
                    }
                }
            }

            // If there is nothing to share and their is a default failure text specified then return this

            if (!hasRequestBeenProcessed && !string.IsNullOrEmpty(DefaultFailureText))
                shareRequest.FailWithDisplayText(DefaultFailureText);
        }
Exemplo n.º 5
0
 public virtual void ConfigureShareRequest(IShareRequest request)
 {
     Sharing.ConfigureShareRequest(request);
 }
            // *** Methods ***

            public Task ShareRequested(IShareRequest shareRequest)
            {
                ShareRequests.Add(shareRequest);
                return Task.FromResult(true);
            }
            // *** Methods ***

            public new void ShareRequested(IShareRequest shareRequest)
            {
                base.ShareRequested(shareRequest);
            }
Exemplo n.º 8
0
 public virtual void ConfigureShareRequest(IShareRequest request)
 {
     Sharing.ConfigureShareRequest(request);
 }