Re: [ADVANCED-DOTNET] What happened to stream CopyTo?

2004-02-19 Thread Shawn A. Van Ness
Just realized that code could benefit from some sample usage... -S static void CopyLargeFile(string source, string destination, bool wait) { int buffersize = 65536; //ymmv bool useasync=true; //required! using (Stream src = new FileStream( source,FileMode.O

Re: [ADVANCED-DOTNET] What happened to stream CopyTo?

2004-02-19 Thread Shawn A. Van Ness
I recently had a similar need... maybe this will help you? http://www.windojitsu.com/code/asyncstreampump.cs.html In my case, I wanted to tap the two streams together, asynchronously... so I use async I/O (viz. Stream.BeginRead). Heed the warning in the comments: although this technique will app

[ADVANCED-DOTNET] What happened to stream CopyTo?

2004-02-19 Thread Alex Ivanoff
I want to copy one stream to another. In unmanaged world I would use IStream::CopyTo. In .NET the only way I see is to do pairs of Read/Write. What happened to CopyTo? === This list is hosted by DevelopMentorĀ® http://www.develop.com Some .NET courses you may be int

Re: [ADVANCED-DOTNET] SELECT * Was: [ADVANCED-DOTNET] Web Services, Remoting and Coupling

2004-02-19 Thread J. Merrill
You're right -- if you need your applications to fully grok the updated schema, then the applications will need to change. My point was that it's quite possible to make many kinds of significant schema changes that end up having no impact at all on applications, provided that the applications a

[ADVANCED-DOTNET] AxWebBrowser questions

2004-02-19 Thread Nick Howard
Hello, I'm working on an application that uses an AxWebBrowser control. I've had a couple of problems. I dynamically create the HTML that I load into some of the pages and others are static pages. Sometimes when I click on a link that should take be to a dynamic page I get a "Page cannot be found"

[ADVANCED-DOTNET] Weird behaviour with XPathNavigator and XSL

2004-02-19 Thread Garry Barclay
We have a trivial shim class which wraps an implementation of IXPathNavigable. When we pass this to an XSL identity transform some of the elements atributes are lost. It doesn't matter whether we wrap our own custom XPathNavigator implementation or XmlDocument's. Anyone else had problems passing c

Re: [ADVANCED-DOTNET] Call STA method from MTA process

2004-02-19 Thread Dave Foderick
Invoke, as in through a delegate. I tried invoking a method synchronously on the STA thread through a delegate and it didn't seem to work. Should it have worked? Anyway I used Thread/ThreadStart to run it and it seems to work but I would be happier if I could make the delegate work. Someone is tel

Re: [ADVANCED-DOTNET] SELECT * Was: [ADVANCED-DOTNET] Web Services, Remoting and Coupling

2004-02-19 Thread Tiseo, Paul
From: Moderated discussion of advanced .NET topics Sent: Tuesday, February 17, 2004 12:29 PM > > A considerate DBA would not do that. She will either make Name > a computed column, or rename the underlying table and make a > view Candidate that has a Name column -- even if it also has > FirstName a

Re: [ADVANCED-DOTNET] SELECT * Was: [ADVANCED-DOTNET] Web Services, Removing and Coupling

2004-02-19 Thread Tiseo, Paul
From: Moderated discussion of advanced .NET topics Sent: Tuesday, February 17, 2004 7:42 PM > > > I prefer SELECT *, because I think the risks in that scenario > > is low, and made lower by proper application of other > > practices. > > Feel free to code however you want ;) We try to adhere to th