This message was deleted.
# general
s
This message was deleted.
t
LGTM. What’s the error?
r
Stack trace about the types only being allow to be immutable types... I have further simplified it.. and I have some output... now i need to increase the complexity and have it return more than "123" 🙂
This is the stack trace - but I wouldn't worry about it as i am inching forward again now.
ok so i have experimented and gotten my list and dict of strings being output... the drama I have is i want my SourceUri from Blob in the array. I can't seem to access the underlying string in those Output<string> and when i try and create a list of Output<string> i get an error... any tips?
public Output<ImmutableArray<Output<string>>> UploadedUri { get; set; }
i am guessing that i want that to just be public Output<ImmutableArray<string>> UploadedUri { get; set; } - but to do that i need to get at the strings hidden behind uploadedFile.SourceUri;
I've achieved what i wanted to do by changing the types within my array from Output<string> to object? eg public Output<ImmutableArray<object?>> UploadedUri { get; set; } instead of public Output<ImmutableArray<Output<string>> UploadedUri { get; set; } Jonathh  [4:45 PM] it seems to be the way as the examples return dicts of <string, object?> - it is quite messy.... but works i guess
t
Output<ImmutableArray<Output<string>>
doesn’t sound right to me. You should be able to process whatever you have to
Output<ImmutableArray<string>>
. Flatten the output.
r
i can't get access to the string behind the outputs - is problem number one
so I have a Output<String> that i want to put into an array of strings. how do i get the string out?
the object? works btw.. it is just messy.
t
So I don’t have your code but this may help:
Copy code
Output<ImmutableArray<Output<string>>> notGood =
    Output.Create(new[] {Output.Create("1"), Output.Create("2")}.ToImmutableArray());
Output<ImmutableArray<string>> better = notGood.Apply(vs =>
     Output.All(vs.Select(v => (Input<string>)v).ToImmutableArray()));
It turns out that
Output.All
doesn’t accept outputs… We should probably add an overload for that.
r
thanks - i'll take a look at that.. the array of outputs does work.. but you have to 'mask' the inner outputs as objects if that makes sense
t
It just feels wrong to me 😉