ASPC.Marvel.CrimeAPI.TokenHelper.CreateAppEventClientContext C# (CSharp) Méthode

CreateAppEventClientContext() public static méthode

Creates a client context based on the properties of an app event
public static CreateAppEventClientContext ( SPRemoteEventProperties properties, bool useAppWeb ) : ClientContext
properties SPRemoteEventProperties Properties of an app event
useAppWeb bool True to target the app web, false to target the host web
Résultat ClientContext
        public static ClientContext CreateAppEventClientContext(SPRemoteEventProperties properties, bool useAppWeb)
        {
            if (properties.AppEventProperties == null)
            {
                return null;
            }

            Uri sharepointUrl = useAppWeb ? properties.AppEventProperties.AppWebFullUrl : properties.AppEventProperties.HostWebFullUrl;
            if (IsHighTrustApp())
            {
                return GetS2SClientContextWithWindowsIdentity(sharepointUrl, null);
            }

            return CreateAcsClientContextForUrl(properties, sharepointUrl);
        }