SiloCitizen3
SiloCitizen3
CC#
Created by SiloCitizen3 on 2/1/2024 in #help
Safe to use Response.OnCompleted ?
yeah, i came across that 2.x caveat where it didnt actually finish sending the response before doing the work, so it would hang until the delegate completed. Thanks!
5 replies
CC#
Created by SiloCitizen3 on 11/15/2023 in #help
XMl: How to convert IEnumerable<XmlNode> to XmlNodeList ?
unless you're dealing with a really old library that requires XmlNode yeah, that's the hole i'm in ;_; thank you!
12 replies
CC#
Created by SiloCitizen3 on 11/15/2023 in #help
XMl: How to convert IEnumerable<XmlNode> to XmlNodeList ?
so I essentially am forced into doing this whole crap?
var xmlDoc = new XDocument(new XElement("Root",
myIEnumerableListOfXmlNode.Select(node => XElement.Parse(node.OuterXml))));

var xmlDocument = new XmlDocument();
using (var xmlReader = xmlDoc.CreateReader())
{
xmlDocument.Load(xmlReader);
}
return xmlDocument.SelectNodes("//Root/*");
var xmlDoc = new XDocument(new XElement("Root",
myIEnumerableListOfXmlNode.Select(node => XElement.Parse(node.OuterXml))));

var xmlDocument = new XmlDocument();
using (var xmlReader = xmlDoc.CreateReader())
{
xmlDocument.Load(xmlReader);
}
return xmlDocument.SelectNodes("//Root/*");
?
12 replies
CC#
Created by SiloCitizen3 on 9/15/2023 in #help
✅ async/await Task in an AWS Lambda
awesome. thank you guys for chiming in and confirming my sanity.
27 replies
CC#
Created by SiloCitizen3 on 9/15/2023 in #help
✅ async/await Task in an AWS Lambda
like that's what im left with, after many many tests on my local machine
27 replies
CC#
Created by SiloCitizen3 on 9/15/2023 in #help
✅ async/await Task in an AWS Lambda
right, but if i'm not awaiting someWorkTasks i dont think lambda is aware that there's still some shit taking place in the background, right?
27 replies
CC#
Created by SiloCitizen3 on 9/15/2023 in #help
✅ async/await Task in an AWS Lambda
essentially stuffed the entire damn api website into a lambda and now all sorts of issues are cropping up. and that's the only thing I can think of, because after repeated tests on my machine, everything works
27 replies
CC#
Created by SiloCitizen3 on 9/15/2023 in #help
✅ async/await Task in an AWS Lambda
this is after a stupid switch from elastic beanstalk over to lambdas. in EB, these issues were never happening, because the damn process was always "alive" in lambda, it's finish quickly or it gets killed off
27 replies
CC#
Created by SiloCitizen3 on 9/15/2023 in #help
✅ async/await Task in an AWS Lambda
so, inside the block, there's various webservices and records being created in different places, along with logging, as things are happening starting XYZ.... dbContext insert record finished XYZ... starting ABC... webservice called finsihed ABC... and at times, all the data and accompanying log lines are there. other times, it doesnt. there's no errors being thrown, because they're handled. what I am notificing is the timestamps. in the cases where all the expected stuff isn't there, the overall execution of the log entries is getting to be over 1min. in the cases where all the expected stuff IS there, the execution duration is much shorter
27 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
blah blah blah "The issue with ViewBags and the recommended best practice boils down to compile time checking. ViewBags are just dictionaries and with that you get 'magic' strings, so if you end up changing the object type of one of the viewbag items or the key name you won't know until runtime" as with all "best practices", it really all boils down to sense and sensability
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
yeah, you just wont get handholding with it, out of the box
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
if it's just to display some crap, that's pretty much what the ViewBag is for
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
So, stick those "for viewing purposes only" values in the ViewBag dictionary, on the Get controller action, and then in view load them from ViewBag.Whatever
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
probably makes sense to stick each form/viewmodel declaration, in seperate child views
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
abandon all concepts of the singular giant <form> tag on the page. you can have multiple forms, you can omit forms and just go for all ajax.
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
so something like
@using (Html.BeginForm("Submit", "Reading", FormMethod.Post))
{
//the long 15 field view model
}

@using (Html.BeginForm("SubmitWithOtherViewModel", "Reading", FormMethod.Post))
{
//the shorter 3 field view model
}
@using (Html.BeginForm("Submit", "Reading", FormMethod.Post))
{
//the long 15 field view model
}

@using (Html.BeginForm("SubmitWithOtherViewModel", "Reading", FormMethod.Post))
{
//the shorter 3 field view model
}
18 replies
CC#
Created by Clink50 on 9/13/2023 in #help
❔ Need help understanding Model Binding better
in mvc you can have multiple forms. Just make another POST endpoint and structure the VIewModel you take in, to just the fields you care about
18 replies
CC#
Created by Tim on 9/13/2023 in #help
✅ Pipe client server
it covers System.Threading.Channels, which I think it what you want
21 replies
CC#
Created by Tim on 9/13/2023 in #help
✅ Pipe client server
Check out https://www.youtube.com/watch?v=E0Ld7ZgE4oY Maybe not. Sorry, I read your original post as INprocess not INTERprocess
21 replies