diff --git a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs index 5afec8bbf5351..e0871d794d2ca 100644 --- a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs +++ b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs @@ -222,7 +222,7 @@ private static ProvisioningDeployment ProcessDeploymentInternal(ProvisioningPlan } // Patch up output references - foreach (ProvisioningOutput output in plan.Infrastructure.GetResources().OfType()) + foreach (ProvisioningOutput output in plan.Infrastructure.GetProvisionableResources().OfType()) { if (outputs.TryGetValue(output.BicepIdentifier, out object? value) && value is not null) diff --git a/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs index c1b1b4ccc11d1..d10f6f69b82e0 100644 --- a/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs @@ -97,7 +97,7 @@ public virtual void Add(Azure.Provisioning.Primitives.Provisionable resource) { public virtual Azure.Provisioning.ProvisioningPlan Build(Azure.Provisioning.ProvisioningBuildOptions? options = null) { throw null; } protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } protected internal System.Collections.Generic.IDictionary> CompileModules(Azure.Provisioning.ProvisioningBuildOptions? options = null) { throw null; } - public override System.Collections.Generic.IEnumerable GetResources() { throw null; } + public override System.Collections.Generic.IEnumerable GetProvisionableResources() { throw null; } public static bool IsValidBicepIdentifier(string? bicepIdentifier) { throw null; } public static string NormalizeBicepIdentifier(string? bicepIdentifier) { throw null; } public virtual void Remove(Azure.Provisioning.Primitives.Provisionable resource) { } @@ -108,8 +108,7 @@ public static void ValidateBicepIdentifier(string? bicepIdentifier, string? para public partial class ProvisioningBuildOptions { public ProvisioningBuildOptions() { } - public System.Collections.Generic.IList InfrastructureResolvers { get { throw null; } set { } } - public System.Collections.Generic.IList PropertyResolvers { get { throw null; } set { } } + public System.Collections.Generic.IList InfrastructureResolvers { get { throw null; } } public System.Random Random { get { throw null; } set { } } } public partial class ProvisioningOutput : Azure.Provisioning.ProvisioningVariable @@ -597,7 +596,7 @@ public BinaryExpression(Azure.Provisioning.Expressions.BicepExpression left, Azu public partial class BoolLiteralExpression : Azure.Provisioning.Expressions.LiteralExpression { public BoolLiteralExpression(bool value) : base (default(object)) { } - public bool Value { get { throw null; } } + public new bool Value { get { throw null; } } } public partial class CommentStatement : Azure.Provisioning.Expressions.BicepStatement { @@ -647,12 +646,12 @@ public InterpolatedStringExpression(string format, Azure.Provisioning.Expression public partial class IntLiteralExpression : Azure.Provisioning.Expressions.LiteralExpression { public IntLiteralExpression(int value) : base (default(object)) { } - public int Value { get { throw null; } } + public new int Value { get { throw null; } } } public abstract partial class LiteralExpression : Azure.Provisioning.Expressions.BicepExpression { - protected LiteralExpression(object? literalValue = null) { } - public object? LiteralValue { get { throw null; } } + protected LiteralExpression(object? value = null) { } + public object? Value { get { throw null; } } } public partial class MemberExpression : Azure.Provisioning.Expressions.BicepExpression { @@ -729,7 +728,7 @@ public SafeMemberExpression(Azure.Provisioning.Expressions.BicepExpression value public partial class StringLiteralExpression : Azure.Provisioning.Expressions.LiteralExpression { public StringLiteralExpression(string value) : base (default(object)) { } - public string Value { get { throw null; } } + public new string Value { get { throw null; } } } public partial class TargetScopeStatement : Azure.Provisioning.Expressions.BicepStatement { @@ -780,7 +779,7 @@ public BicepValueReference(Azure.Provisioning.Primitives.ProvisionableConstruct public partial class ClientCreatorOutputResolver : Azure.Provisioning.Primitives.InfrastructureResolver { public ClientCreatorOutputResolver() { } - public override System.Collections.Generic.IEnumerable ResolveResources(Azure.Provisioning.ProvisioningBuildOptions options, System.Collections.Generic.IEnumerable resources) { throw null; } + public override System.Collections.Generic.IEnumerable ResolveResources(System.Collections.Generic.IEnumerable resources, Azure.Provisioning.ProvisioningBuildOptions options) { throw null; } } public partial class DynamicResourceNamePropertyResolver : Azure.Provisioning.Primitives.ResourceNamePropertyResolver { @@ -799,15 +798,16 @@ public partial interface IClientCreator : Azure.Provisioning. public abstract partial class InfrastructureResolver { protected InfrastructureResolver() { } - public System.Collections.Generic.IEnumerable GetNestedInfrastructure(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Infrastructure infrastructure) { throw null; } - public virtual void ResolveInfrastructure(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Infrastructure infrastructure) { } - public virtual System.Collections.Generic.IEnumerable ResolveResources(Azure.Provisioning.ProvisioningBuildOptions options, System.Collections.Generic.IEnumerable resources) { throw null; } + public virtual System.Collections.Generic.IEnumerable GetNestedInfrastructure(Azure.Provisioning.Infrastructure infrastructure, Azure.Provisioning.ProvisioningBuildOptions options) { throw null; } + public virtual void ResolveInfrastructure(Azure.Provisioning.Infrastructure infrastructure, Azure.Provisioning.ProvisioningBuildOptions options) { } + public virtual void ResolveProperties(Azure.Provisioning.Primitives.ProvisionableConstruct construct, Azure.Provisioning.ProvisioningBuildOptions options) { } + public virtual System.Collections.Generic.IEnumerable ResolveResources(System.Collections.Generic.IEnumerable resources, Azure.Provisioning.ProvisioningBuildOptions options) { throw null; } } - public partial class LocationPropertyResolver : Azure.Provisioning.Primitives.PropertyResolver + public partial class LocationPropertyResolver : Azure.Provisioning.Primitives.InfrastructureResolver { public LocationPropertyResolver() { } protected virtual Azure.Provisioning.BicepValue GetDefaultLocation(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableConstruct construct) { throw null; } - public override void ResolveProperties(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableConstruct construct) { } + public override void ResolveProperties(Azure.Provisioning.Primitives.ProvisionableConstruct construct, Azure.Provisioning.ProvisioningBuildOptions options) { } } public partial class ModuleImport : Azure.Provisioning.Primitives.NamedProvisionableConstruct { @@ -827,18 +827,13 @@ protected NamedProvisionableConstruct(string bicepIdentifier) { } public partial class OrderingInfrastructureResolver : Azure.Provisioning.Primitives.InfrastructureResolver { public OrderingInfrastructureResolver() { } - public override System.Collections.Generic.IEnumerable ResolveResources(Azure.Provisioning.ProvisioningBuildOptions options, System.Collections.Generic.IEnumerable resources) { throw null; } - } - public abstract partial class PropertyResolver - { - protected PropertyResolver() { } - public abstract void ResolveProperties(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableConstruct construct); + public override System.Collections.Generic.IEnumerable ResolveResources(System.Collections.Generic.IEnumerable resources, Azure.Provisioning.ProvisioningBuildOptions options) { throw null; } } public abstract partial class Provisionable { internal Provisionable() { } protected internal abstract System.Collections.Generic.IEnumerable Compile(); - public virtual System.Collections.Generic.IEnumerable GetResources() { throw null; } + public virtual System.Collections.Generic.IEnumerable GetProvisionableResources() { throw null; } protected internal virtual void Resolve(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } protected internal virtual void Validate(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } } @@ -849,7 +844,7 @@ protected ProvisionableConstruct() { } public Azure.Provisioning.Infrastructure? ParentInfrastructure { get { throw null; } } protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override System.Collections.Generic.IEnumerable GetResources() { throw null; } + public override System.Collections.Generic.IEnumerable GetProvisionableResources() { throw null; } protected internal void OverrideWithExpression(Azure.Provisioning.Expressions.BicepExpression reference) { } protected internal override void Resolve(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -882,11 +877,11 @@ public enum ResourceNameCharacters Period = 32, Parentheses = 64, } - public abstract partial class ResourceNamePropertyResolver : Azure.Provisioning.Primitives.PropertyResolver + public abstract partial class ResourceNamePropertyResolver : Azure.Provisioning.Primitives.InfrastructureResolver { protected ResourceNamePropertyResolver() { } public abstract Azure.Provisioning.BicepValue? ResolveName(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableResource resource, Azure.Provisioning.Primitives.ResourceNameRequirements requirements); - public override void ResolveProperties(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableConstruct construct) { } + public override void ResolveProperties(Azure.Provisioning.Primitives.ProvisionableConstruct construct, Azure.Provisioning.ProvisioningBuildOptions options) { } protected static string SanitizeText(string text, Azure.Provisioning.Primitives.ResourceNameCharacters validCharacters) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs index 812767e6f0c4d..a8f3fa23f5438 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs @@ -30,9 +30,9 @@ public class IdentifierExpression(string name) : BicepExpression internal override BicepWriter Write(BicepWriter writer) => writer.Append(Name); } -public abstract class LiteralExpression(object? literalValue = null) : BicepExpression +public abstract class LiteralExpression(object? value = null) : BicepExpression { - public object? LiteralValue { get; } = literalValue; + public object? Value { get; } = value; } public class NullLiteralExpression() : LiteralExpression() @@ -42,19 +42,19 @@ public class NullLiteralExpression() : LiteralExpression() public class BoolLiteralExpression(bool value) : LiteralExpression(value) { - public bool Value { get; } = value; + public new bool Value { get => (bool)base.Value!; } internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value ? "true" : "false"); } public class IntLiteralExpression(int value) : LiteralExpression(value) { - public int Value { get; } = value; + public new int Value { get => (int)base.Value!; } internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value.ToString()); } public class StringLiteralExpression(string value) : LiteralExpression(value) { - public string Value { get; } = value; + public new string Value { get => (string)base.Value!; } internal override BicepWriter Write(BicepWriter writer) => (Value == null) ? writer.Append("null") : diff --git a/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs b/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs index 2af84cdd4d58f..7bbb2f82a5737 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs @@ -35,7 +35,7 @@ public class Infrastructure(string bicepName = "main") : Provisionable private Infrastructure? _parent = null; /// - public override IEnumerable GetResources() => _resources; + public override IEnumerable GetProvisionableResources() => _resources; private readonly List _resources = []; /// @@ -206,7 +206,7 @@ protected internal override void Validate(ProvisioningBuildOptions? options = nu { options ??= new(); base.Validate(options); - foreach (Provisionable resource in GetResources()) { resource.Validate(options); } + foreach (Provisionable resource in GetProvisionableResources()) { resource.Validate(options); } } /// @@ -215,12 +215,12 @@ protected internal override void Resolve(ProvisioningBuildOptions? options = def options ??= new(); base.Resolve(options); - Provisionable[] cached = [.. GetResources()]; // Copy so Resolve can mutate + Provisionable[] cached = [.. GetProvisionableResources()]; // Copy so Resolve can mutate foreach (Provisionable resource in cached) { resource.Resolve(options); } foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - resolver.ResolveInfrastructure(options, this); + resolver.ResolveInfrastructure(this, options); } } @@ -248,7 +248,7 @@ protected internal IDictionary> CompileModul List nested = []; foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - nested.AddRange(resolver.GetNestedInfrastructure(options, this)); + nested.AddRange(resolver.GetNestedInfrastructure(this, options)); } foreach (Infrastructure infra in nested) { @@ -267,7 +267,7 @@ private List CompileInternal(ProvisioningBuildOptions? options) statements.Add(new TargetScopeStatement(TargetScope)); } - IEnumerable resources = GetResources(); + IEnumerable resources = GetProvisionableResources(); // Optionally customize the resources with the extensibility hooks on // ProvisioningBuildOptions. @@ -275,7 +275,7 @@ private List CompileInternal(ProvisioningBuildOptions? options) { foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - resources = resolver.ResolveResources(options, resources); + resources = resolver.ResolveResources(resources, options); } } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs index baa496ff93d5b..80ac5efc6c978 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs @@ -71,7 +71,7 @@ public TClient CreateClient( public class ClientCreatorOutputResolver : InfrastructureResolver { /// - public override IEnumerable ResolveResources(ProvisioningBuildOptions options, IEnumerable resources) + public override IEnumerable ResolveResources(IEnumerable resources, ProvisioningBuildOptions options) { foreach (Provisionable resource in resources) { diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs index b734b2496ef5b..b962bc6cbee91 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs @@ -15,36 +15,47 @@ namespace Azure.Provisioning.Primitives; public abstract class InfrastructureResolver { /// - /// Resolve any properties of the infrastructure. + /// Try to resolve the values of any unset properties in the given construct. /// + /// The construct with properties to resolve. /// The current build options. + public virtual void ResolveProperties( + ProvisionableConstruct construct, + ProvisioningBuildOptions options) + { + } + + /// + /// Resolve any properties of the infrastructure. + /// /// The infrastructure to resolve properties of. + /// The current build options. public virtual void ResolveInfrastructure( - ProvisioningBuildOptions options, - Infrastructure infrastructure) + Infrastructure infrastructure, + ProvisioningBuildOptions options) { } /// /// Process the collection of resources in the infrastructure. /// - /// The current build options. /// The existing resources to resolve. + /// The current build options. public virtual IEnumerable ResolveResources( - ProvisioningBuildOptions options, - IEnumerable resources) => + IEnumerable resources, + ProvisioningBuildOptions options) => resources; /// /// Gets any nested infrastructure that should be composed separately. /// - /// The current build options. /// /// The infrastructure to inspect for any nested infrastructure. /// - /// - public IEnumerable GetNestedInfrastructure( - ProvisioningBuildOptions options, - Infrastructure infrastructure) => + /// The current build options. + /// Nested infrastructure. + public virtual IEnumerable GetNestedInfrastructure( + Infrastructure infrastructure, + ProvisioningBuildOptions options) => []; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs index 94d4434e800ad..3c6c1516b169c 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs @@ -13,10 +13,10 @@ namespace Azure.Provisioning.Primitives; /// /// Default all location properties to their resource group's location. /// -public class LocationPropertyResolver : PropertyResolver +public class LocationPropertyResolver : InfrastructureResolver { /// - public override void ResolveProperties(ProvisioningBuildOptions options, ProvisionableConstruct construct) + public override void ResolveProperties(ProvisionableConstruct construct, ProvisioningBuildOptions options) { // We only need to set a location if one doesn't already exist if (construct.ProvisioningProperties.TryGetValue("Location", out BicepValue? location) && @@ -62,8 +62,8 @@ private ProvisioningParameter GetOrCreateLocationParameter( // Try to find an existing location param with the same value Infrastructure infra = construct.ParentInfrastructure ?? throw new InvalidOperationException($"Construct {construct} must be added to an {nameof(Infrastructure)} instance before resolving properties."); - IDictionary existing = - infra.GetResources() + Dictionary existing = + infra.GetProvisionableResources() .OfType() .Where(p => p.BicepIdentifier.StartsWith("location")) .ToDictionary(p => p.BicepIdentifier); diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs index d2f7717deb84c..99b7018946872 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs @@ -14,8 +14,8 @@ public class OrderingInfrastructureResolver : InfrastructureResolver { /// public override IEnumerable ResolveResources( - ProvisioningBuildOptions options, - IEnumerable resources) => + IEnumerable resources, + ProvisioningBuildOptions options) => resources.OrderBy(construct => construct switch { diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/PropertyResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/PropertyResolver.cs deleted file mode 100644 index 1c976d8a7d9ba..0000000000000 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/PropertyResolver.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Provisioning.Primitives; - -/// -/// A property resolver attempts to resolve the values of any unset properties -/// in a construct. This can be useful for defaulting common values, -/// implementing organization policies, or other scenarios where you want to -/// uniformly configure all the resources in a deployment. -/// -public abstract class PropertyResolver -{ - /// - /// Try to resolve the values of any unset properties in the given construct. - /// - /// The current build options. - /// The construct with properties to resolve. - public abstract void ResolveProperties(ProvisioningBuildOptions options, ProvisionableConstruct construct); -} diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs index 578687e0ebd70..89e1500fdac11 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs @@ -21,7 +21,7 @@ internal Provisionable() { } /// be the object itself for everything but . /// /// Any resources represented by this object. - public virtual IEnumerable GetResources() { yield return this; } + public virtual IEnumerable GetProvisionableResources() { yield return this; } /// /// Resolve any resources or properties that were not explicitly specified. diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableConstruct.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableConstruct.cs index 02b3e9839da64..4c686c1a71e02 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableConstruct.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableConstruct.cs @@ -19,7 +19,7 @@ public abstract class ProvisionableConstruct : Provisionable /// [EditorBrowsable(EditorBrowsableState.Never)] - public override IEnumerable GetResources() => base.GetResources(); + public override IEnumerable GetProvisionableResources() => base.GetProvisionableResources(); /// /// Gets the properties of the construct. @@ -82,9 +82,9 @@ protected internal override void Resolve(ProvisioningBuildOptions? options = nul base.Resolve(options); // Resolve any property values - foreach (PropertyResolver resolver in options.PropertyResolvers) + foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - resolver.ResolveProperties(options, this); + resolver.ResolveProperties(this, options); } } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs index 082c483be48f7..fa18657eb7d3f 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs @@ -101,10 +101,10 @@ public readonly struct ResourceNameRequirements( /// https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules /// . /// -public abstract class ResourceNamePropertyResolver : PropertyResolver +public abstract class ResourceNamePropertyResolver : InfrastructureResolver { /// - public override void ResolveProperties(ProvisioningBuildOptions options, ProvisionableConstruct construct) + public override void ResolveProperties(ProvisionableConstruct construct, ProvisioningBuildOptions options) { // We only need to name resources if (construct is not ProvisionableResource resource) { return; } diff --git a/sdk/provisioning/Azure.Provisioning/src/ProvisioningBuildOptions.cs b/sdk/provisioning/Azure.Provisioning/src/ProvisioningBuildOptions.cs index c20d3f422e317..eba91acc3d595 100644 --- a/sdk/provisioning/Azure.Provisioning/src/ProvisioningBuildOptions.cs +++ b/sdk/provisioning/Azure.Provisioning/src/ProvisioningBuildOptions.cs @@ -14,26 +14,25 @@ namespace Azure.Provisioning; /// public class ProvisioningBuildOptions { - /// - /// Gets or sets the collection of s to apply - /// to all resources being composed. - /// - public IList PropertyResolvers { get; set; } = - [ - new DynamicResourceNamePropertyResolver(), - new LocationPropertyResolver(), - ]; - // TODO: Do we want to make this less mutable like AddPipelinePolicy to - // maintain more control over how people are able to modify these? - /// /// Gets or sets the collection of s to /// apply to any being composed. /// - public IList InfrastructureResolvers { get; set; } = + /// + /// By default this adds , + /// , and + /// . You can clear this list + /// and replace it with other resolvers. You can also insert your own + /// resolvers before or after these resolvers. + /// + public IList InfrastructureResolvers { get; } = [ + new DynamicResourceNamePropertyResolver(), + new LocationPropertyResolver(), new OrderingInfrastructureResolver(), ]; + // TODO: Resource resolvers + // TODO: IConfig PropertyProvider /// /// Gets or sets a random generator. It defaults to a new @@ -46,6 +45,4 @@ public class ProvisioningBuildOptions public Random Random { get; set; } = new Random(); // TODO: Add a DefaultScope to allow globally scoping all resources - // TODO: Resource resolvers - // TODO: IConfig PropertyProvider }