I use a third party component that accepts a maximum of 25 KB of data at a time. I am passing an array of objects to this third-party component from my application.
However, the amount of data that my application writes is much larger than 25 KB. I retrieve data from the database and directly call the component.
I added a link to the component in the application. The data that I pass to the component as an array of an object that contains primitive and non-primitive types.
How can I implement data throttling here?
. , -, . , . , Stopwatch.EllapsedSeconds 1 . reset reset , . , , ( ) 25 . System.Thread.Thread.Sleep(Math.Max(1000 - StopWatch.EllapsedMilliseconds, 0)). , , .
Stopwatch.EllapsedSeconds
System.Thread.Thread.Sleep(Math.Max(1000 - StopWatch.EllapsedMilliseconds, 0))
. :
, > 25 /, , , .
BufferedStream MSDN. , 25 .
/, , , 25 , 24 , , 1 .
25 , , Thread.Sleep(1000), , .
Thread.Sleep(1000)