All Questions
2,660
questions
1
vote
0
answers
17
views
convert object to mock stream
given below was my object class .here i am trying to convert this object class to mock stream
public class WebHookBody
{
public string entryId { get; set; }
}
i am trying to add ...
0
votes
0
answers
10
views
How can I record internal computer sound joined with input sound and save all in one file?
I want to write a client and server in c#, client will record internal sound + input sound (microphone) and stream it to the server, how can I achieve the join effect, to stream their both without any ...
1
vote
1
answer
32
views
System.Text.Json.JsonSerializer does not overwrite existing file fully when using file stream
Consider the following code:
internal class Program
{
static async Task Main(string[] args)
{
var t = new Thing() { Name = "Some Long Name" };
string path = @"c:\...
0
votes
0
answers
32
views
Streaming data from delegate to function call
I have a 3rd party library that calls a delegate every time there is a buffer of data, and I need to get this buffer into a stream and send the stream to S3.
So I use a FileStream to write to a ...
1
vote
1
answer
53
views
Write and read string from MemoryStream
Please consider this scenario:
I want to read a file and then place its bytes to MemoryStream and then write some strings to it and then immediately read entire MemotyStream. For example I have a text ...
1
vote
3
answers
71
views
How to peek the n-th char in stream reader c#
I am making a custom input reader for a parser in C#, and I am trying to peek the n-th character from a stream reader without moving the streams position, so that when the function is called multiple ...
0
votes
1
answer
54
views
How to make async I/O more efficient?
I am using the following method to read from a very large file and write the results to a new file.
The amount of data read from the input file and written to a new file can very wildly, from a few ...
1
vote
0
answers
65
views
C# `StreamReader.ReadToEnd()` hangs unless process is killed
I'm trying to build an Excel add-in that'll let the user invoke R commands in cells. Something like BERT, except that BERT uses its own R environment independent of the environment actually installed ...
0
votes
2
answers
242
views
Efficient string replace in a stream
I need to replace a string in a streaming http response. The naive way of doing that would be
using var reader = new StreamReader(input, leaveOpen: true);
var original = await reader.ReadToEndAsync();
...
0
votes
1
answer
126
views
How to reset a stream?
I am trying to connect a pathology analyzer and receive data. Following is my code.
private void ReceiveData(string IP, string PortNo)
{
var port = Convert.ToInt32(PortNo);
...
0
votes
0
answers
46
views
Why is my Multipart Form not working when sent from .NET Framework 4.6.2?
I currently have 2 APIs. One is in .NET Framework 4.6.2 and one is in .NET 8.
I'm trying to upload files and metadata as form-data though the .NET Framework API to the .NET 8 API.
When uploading form-...
0
votes
0
answers
69
views
CsvReader.Read / CsvReader.ReadAsync duplicates data
Inside an Activity in Azure Durable Functions, I have a method that reads Csv file from certain index. Purpose of this method is to read 2000 rows of the file or until last row, starting from the ...
0
votes
0
answers
73
views
In C# HttpResponse, when does the response stream starts to be sent to the client?
I am using streams in my http response and was wondering when the stream starts to be sent to the client that sent the request.
I thought it was sent when the response was returned but one of my ...
1
vote
0
answers
73
views
Implementing Oneway Grain to Grain Media Streaming with Different Nodes and Silos in the Same Cluster
Description:
I'm trying to implement a one-way grain to grain media streaming system using Orleans, where the sender and receiver grains are located on different nodes and silos within the same ...
0
votes
0
answers
67
views
I want to find a way to c# CopyToAsync source code Link;
I want to find a way to c# :
public System.Threading.Tasks.Task CopyToAsync (System.IO.Stream destination, System.Threading.CancellationToken cancellationToken);
source code link.
The reason is that ...