-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loose objects with strong views #7251
base: main
Are you sure you want to change the base?
Conversation
/// <returns></returns> | ||
/// <exception cref="DistributedApplicationException"></exception> | ||
/// <exception cref="InvalidOperationException"></exception> | ||
public static IResourceBuilder<RedisResource> ApplyRedis(this IResourceBuilder<RedisResource> builder, int? port = null, Action<IResourceBuilder<RedisResource>>? configureContainer = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eerhardt I don't think this will be the final API shape but the idea here is to get the redis defaults applied to an existing builder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't expect "normal" customers to call this method right? Maybe it shouldn't be an extension method so it doesn't clutter up the Intellisense for normal AppHost developers.
- This fundamentally changes the resource model to be all in on annotations. Resources are a set of annotatations and strongly typed "views" can be modeled over those annotations. Each resource has a ResourceTypeAnnotation which stores the actual resource type. This means that runtime code should never use is or as (though we can make as work) for resource type checks, but should instead use the new ResourceKind API. - This enables cleanly switching between resource types while keeping the veneer of strong typing at the top level.
9af7689
to
0f09e8c
Compare
ResourceTypeAnnotation
which stores the actual resource type. This means that runtime code should never use is or as for resource type checks but should instead use the new ResourceKind API to determine the type of the resource.TODO:
Issues found: