2 instantiations of RpcResource
Aspire.Hosting.Native.Server (2)
Api\RpcAuthoringApi.cs (2)
30
public RpcResource AddContainer(string name, string image) =>
new
(this, Composition.AddContainer(name, image));
35
new
(this, Composition.AddExecutable(name, executablePath, workingDirectory));
64 references to RpcResource
Aspire.Hosting.Native.Server (64)
Api\RpcAuthoringApi.cs (24)
30
public
RpcResource
AddContainer(string name, string image) => new(this, Composition.AddContainer(name, image));
34
public
RpcResource
AddExecutable(string name, string executablePath, string workingDirectory) =>
100
public
RpcResource
WithEnvironment(string name, [AspireUnion(typeof(string), typeof(DeclaredValue), typeof(RpcEndpoint), typeof(
RpcResource
))] object value)
109
public
RpcResource
WithArgs(string[] args)
126
public
RpcResource
WithEndpoint(RpcEndpointOptions options)
147
public
RpcResource
WithImageTag(string tag)
174
public
RpcResource
WithConnectionString([AspireUnion(typeof(string), typeof(DeclaredValue), typeof(RpcEndpoint), typeof(
RpcResource
))] object value)
183
public
RpcResource
WithReference(
RpcResource
source)
192
public
RpcResource
WaitFor(
RpcResource
dependency)
201
public
RpcResource
WithSerializedAnnotation(string annotationId, string json)
225
public async Task<
RpcResource
> WithEnvironmentCallback(Func<RpcEnvironmentEditor, Task> callback)
234
public async Task<
RpcResource
> WithArgsCallback(Func<RpcArgsEditor, Task> callback)
248
RpcResource
source => new DeclaredValue(source.Owner.Composition,
277
internal sealed class RpcEndpoint(
RpcResource
resource, string name) : ICapabilityLifetime
298
internal abstract class RpcEditorScope(
RpcResource
resource) : ICapabilityLifetime
301
protected
RpcResource
Resource { get; } = resource;
308
internal sealed class RpcEnvironmentEditor(
RpcResource
resource) : RpcEditorScope(resource)
312
public void Set(string name, [AspireUnion(typeof(string), typeof(DeclaredValue), typeof(RpcEndpoint), typeof(
RpcResource
))] object value) =>
318
internal sealed class RpcArgsEditor(
RpcResource
resource) : RpcEditorScope(resource)
322
public void Add([AspireUnion(typeof(string), typeof(DeclaredValue), typeof(RpcEndpoint), typeof(
RpcResource
))] object value) =>
artifacts\obj\Aspire.Hosting.Native.Server\Debug\native-ats\NativeDispatch.g.cs (40)
738
var
result = target.AddContainer(RpcArguments.String(arguments["name"]), RpcArguments.String(arguments["image"]));
746
var
result = target.AddExecutable(RpcArguments.String(arguments["name"]), RpcArguments.String(arguments["executablePath"]), RpcArguments.String(arguments["workingDirectory"]));
768
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
776
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
783
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
812
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
814
var
result = target.WaitFor(handles.Get<
RpcResource
>(arguments["dependency"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource"));
820
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
822
var
result = target.WithArgs(RpcArguments.Strings(arguments["args"]));
828
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
829
var
result = await target.WithArgsCallback(connection.CreateAuthoringCallback<RpcArgsEditor>(callbackConnection, RpcArguments.String(arguments["callback"]), "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcArgsEditor")).ConfigureAwait(false);
835
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
837
var
result = target.WithConnectionString(RpcArguments.Union(arguments["value"], handles, ["Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredValue", "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcEndpoint", "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource"]));
843
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
845
var
result = target.WithEndpoint(RpcArguments.Dto(arguments["options"], NativeRpcJsonContext.Default.RpcEndpointOptions));
851
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
853
var
result = target.WithEnvironment(RpcArguments.String(arguments["name"]), RpcArguments.Union(arguments["value"], handles, ["Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredValue", "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcEndpoint", "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource"]));
859
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
860
var
result = await target.WithEnvironmentCallback(connection.CreateAuthoringCallback<RpcEnvironmentEditor>(callbackConnection, RpcArguments.String(arguments["callback"]), "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcEnvironmentEditor")).ConfigureAwait(false);
866
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
868
var
result = target.WithImageTag(RpcArguments.String(arguments["tag"]));
874
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
876
var
result = target.WithReference(handles.Get<
RpcResource
>(arguments["source"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource"));
882
var
target = handles.Get<
RpcResource
>(arguments["context"], "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource");
884
var
result = target.WithSerializedAnnotation(RpcArguments.String(arguments["annotationId"]), RpcArguments.String(arguments["json"]));