@@ -75,30 +75,30 @@ public bool TryGetFunctionMetadata(string functionName, out FunctionMetadata fun
7575 /// Gets the function metadata array from all providers.
7676 /// </summary>
7777 /// <param name="forceRefresh">Forces reload from all providers.</param>
78- /// <param name="applyWhitelist ">Apply functions whitelist filter.</param>
78+ /// <param name="applyAllowList ">Apply functions allow list filter.</param>
7979 /// <returns> An Immmutable array of FunctionMetadata.</returns>
80- public ImmutableArray < FunctionMetadata > GetFunctionMetadata ( bool forceRefresh , bool applyWhitelist = true )
80+ public ImmutableArray < FunctionMetadata > GetFunctionMetadata ( bool forceRefresh , bool applyAllowList = true )
8181 {
8282 if ( forceRefresh || _servicesReset || _functionMetadataArray . IsDefaultOrEmpty )
8383 {
8484 _functionMetadataArray = LoadFunctionMetadata ( forceRefresh ) ;
85- _logger . FunctionMetadataManagerFunctionsLoaded ( ApplyWhitelist ( _functionMetadataArray ) . Count ( ) ) ;
85+ _logger . FunctionMetadataManagerFunctionsLoaded ( ApplyAllowList ( _functionMetadataArray ) . Count ( ) ) ;
8686 _servicesReset = false ;
8787 }
8888
89- return applyWhitelist ? ApplyWhitelist ( _functionMetadataArray ) : _functionMetadataArray ;
89+ return applyAllowList ? ApplyAllowList ( _functionMetadataArray ) : _functionMetadataArray ;
9090 }
9191
92- private ImmutableArray < FunctionMetadata > ApplyWhitelist ( ImmutableArray < FunctionMetadata > metadataList )
92+ private ImmutableArray < FunctionMetadata > ApplyAllowList ( ImmutableArray < FunctionMetadata > metadataList )
9393 {
94- var whitelist = _scriptOptions . Value ? . Functions ;
94+ var allowList = _scriptOptions . Value ? . Functions ;
9595
96- if ( whitelist == null || metadataList . IsDefaultOrEmpty )
96+ if ( allowList == null || metadataList . IsDefaultOrEmpty )
9797 {
9898 return metadataList ;
9999 }
100100
101- return metadataList . Where ( metadata => whitelist . Any ( functionName => functionName . Equals ( metadata . Name , StringComparison . CurrentCultureIgnoreCase ) ) ) . ToImmutableArray ( ) ;
101+ return metadataList . Where ( metadata => allowList . Any ( functionName => functionName . Equals ( metadata . Name , StringComparison . CurrentCultureIgnoreCase ) ) ) . ToImmutableArray ( ) ;
102102 }
103103
104104 private void InitializeServices ( )
@@ -123,7 +123,7 @@ internal ImmutableArray<FunctionMetadata> LoadFunctionMetadata(bool forceRefresh
123123 {
124124 _functionMetadataMap . Clear ( ) ;
125125
126- ICollection < string > functionsWhiteList = _scriptOptions ? . Value ? . Functions ;
126+ ICollection < string > functionsAllowList = _scriptOptions ? . Value ? . Functions ;
127127 _logger . FunctionMetadataManagerLoadingFunctionsMetadata ( ) ;
128128
129129 var immutableFunctionMetadata = _functionMetadataProvider . GetFunctionMetadata ( _languageWorkerOptions . Value . WorkerConfigs , forceRefresh ) ;
@@ -154,10 +154,10 @@ internal ImmutableArray<FunctionMetadata> LoadFunctionMetadata(bool forceRefresh
154154 }
155155 Errors = _functionErrors . ToImmutableDictionary ( kvp => kvp . Key , kvp => kvp . Value . ToImmutableArray ( ) ) ;
156156
157- if ( functionsWhiteList != null )
157+ if ( functionsAllowList != null )
158158 {
159- _logger . LogInformation ( $ "A function whitelist has been specified, excluding all but the following functions: [{ string . Join ( ", " , functionsWhiteList ) } ]") ;
160- Errors = _functionErrors . Where ( kvp => functionsWhiteList . Any ( functionName => functionName . Equals ( kvp . Key , StringComparison . CurrentCultureIgnoreCase ) ) ) . ToImmutableDictionary ( kvp => kvp . Key , kvp => kvp . Value . ToImmutableArray ( ) ) ;
159+ _logger . LogInformation ( $ "A function allow list has been specified, excluding all but the following functions: [{ string . Join ( ", " , functionsAllowList ) } ]") ;
160+ Errors = _functionErrors . Where ( kvp => functionsAllowList . Any ( functionName => functionName . Equals ( kvp . Key , StringComparison . CurrentCultureIgnoreCase ) ) ) . ToImmutableDictionary ( kvp => kvp . Key , kvp => kvp . Value . ToImmutableArray ( ) ) ;
161161 }
162162
163163 return functionMetadataList . ToImmutableArray ( ) ;
0 commit comments