public ClientContext GetClientContext(SpoAuthenticationMethod method, string webUrl, ExecutionContext exeuctionContext) { switch (method) { case SpoAuthenticationMethod.UserNamePassword: return(GetClientContextWithUserNamePassword(webUrl)); case SpoAuthenticationMethod.SharePointAppIdentity: return(GetClientContextWithSharePointAppIdentity(webUrl)); case SpoAuthenticationMethod.AzureAppIdentity: default: return(GetClientContextWithAzureAppIdentity(webUrl, exeuctionContext)); } }
public ClientContext GetClientContext(string webUrl, ExecutionContext exeuctionContext) { SpoAuthenticationMethod authMethod = this.GetSpoAuthenticationMethodFromAppSettings(); return(this.GetClientContext(authMethod, webUrl, exeuctionContext)); }