@@ -21,6 +21,7 @@ public static class PolicyListExtensions
2121 /// <param name="policies"></param>
2222 /// <param name="policyInterface">The type of policy to remove.</param>
2323 /// <param name="buildKey">The key the policy applies.</param>
24+ [ Obsolete ( "Use IPolicyList.Clear(...)" ) ]
2425 public static void Clear ( this IPolicyList policies , Type policyInterface , object buildKey )
2526 {
2627 var key = ParseBuildKey ( buildKey ) ;
@@ -33,6 +34,7 @@ public static void Clear(this IPolicyList policies, Type policyInterface, object
3334 /// <typeparam name="TPolicyInterface">The type the policy was registered as.</typeparam>
3435 /// <param name="policies"><see cref="IPolicyList"/> to remove the policy from.</param>
3536 /// <param name="buildKey">The key the policy applies.</param>
37+ [ Obsolete ( "Use IPolicyList.Clear(...)" ) ]
3638 public static void Clear < TPolicyInterface > ( this IPolicyList policies , object buildKey )
3739 where TPolicyInterface : IBuilderPolicy
3840 {
@@ -45,6 +47,7 @@ public static void Clear<TPolicyInterface>(this IPolicyList policies, object bui
4547 /// </summary>
4648 /// <typeparam name="TPolicyInterface">The type the policy was registered as.</typeparam>
4749 /// <param name="policies"><see cref="IPolicyList"/> to remove the policy from.</param>
50+ [ Obsolete ( "Use IPolicyList.Clear(null, null, ...)" ) ]
4851 public static void ClearDefault < TPolicyInterface > ( this IPolicyList policies )
4952 where TPolicyInterface : IBuilderPolicy
5053 {
@@ -57,6 +60,7 @@ public static void ClearDefault<TPolicyInterface>(this IPolicyList policies)
5760 /// </summary>
5861 /// <param name="policies"></param>
5962 /// <param name="policyInterface">The type the policy was registered as.</param>
63+ [ Obsolete ( "Use IPolicyList.Clear(null, null, ...)" ) ]
6064 public static void ClearDefault ( this IPolicyList policies , Type policyInterface )
6165 {
6266 ( policies ?? throw new ArgumentNullException ( nameof ( policies ) ) ) . Clear ( null , null , policyInterface ) ;
@@ -74,6 +78,7 @@ public static void ClearDefault(this IPolicyList policies, Type policyInterface)
7478 /// <param name="policyInterface">The <see cref="Type"/> of the policy.</param>
7579 /// <param name="policy">The policy to be registered.</param>
7680 /// <param name="buildKey">The key the policy applies.</param>
81+ [ Obsolete ( "Use IPolicyList.Set(...)" ) ]
7782 public static void Set ( this IPolicyList policies , Type policyInterface , IBuilderPolicy policy , object buildKey = null )
7883 {
7984 var key = ParseBuildKey ( buildKey ) ;
@@ -133,6 +138,7 @@ public static void SetDefault<TPolicyInterface>(this IPolicyList policies, TPoli
133138 /// <param name="policyInterface">The interface the policy is registered under.</param>
134139 /// <param name="buildKey">The key the policy applies.</param>
135140 /// <returns>The policy in the list, if present; returns null otherwise.</returns>
141+ [ Obsolete ( "Use IPolicyList.Get(...)" ) ]
136142 public static IBuilderPolicy Get ( this IPolicyList policies , Type policyInterface , object buildKey )
137143 {
138144 return ( policies ?? throw new ArgumentNullException ( nameof ( policies ) ) ) . GetOrDefault ( policyInterface , buildKey , out IPolicyList _ ) ;
0 commit comments