ASPC.Marvel.CrimeAPI.SharePointAcsContextProvider.CreateSharePointContext C# (CSharp) Метод

CreateSharePointContext() защищенный Метод

protected CreateSharePointContext ( Uri spHostUrl, Uri spAppWebUrl, string spLanguage, string spClientTag, string spProductNumber, System.Web.HttpRequestBase httpRequest ) : SharePointContext
spHostUrl System.Uri
spAppWebUrl System.Uri
spLanguage string
spClientTag string
spProductNumber string
httpRequest System.Web.HttpRequestBase
Результат SharePointContext
        protected override SharePointContext CreateSharePointContext(Uri spHostUrl, Uri spAppWebUrl, string spLanguage, string spClientTag, string spProductNumber, HttpRequestBase httpRequest)
        {
            string contextTokenString = TokenHelper.GetContextTokenFromRequest(httpRequest);
            if (string.IsNullOrEmpty(contextTokenString))
            {
                return null;
            }

            SharePointContextToken contextToken = null;
            try
            {
                contextToken = TokenHelper.ReadAndValidateContextToken(contextTokenString, httpRequest.Url.Authority);
            }
            catch (WebException)
            {
                return null;
            }
            catch (AudienceUriValidationFailedException)
            {
                return null;
            }

            return new SharePointAcsContext(spHostUrl, spAppWebUrl, spLanguage, spClientTag, spProductNumber, contextTokenString, contextToken);
        }