W
William Stacey [MVP]
It occurs to me that in the same way you can use LINQ and DLinQ to get
strong typing and operations over a objects and tables, you could use the
same method to operate over files and directories.
So within VS or at the Command Line I could start type:
\temp\dir\file.txt
And get intellisense as I go with filenames and directory names relative to
the current context.
More importantly, if EXEs supported metadata for arguments (similar to Monad
CmdLets), then you could get dynamic overloads for the parameter sets.
Something like:
FileInfo fi = new FileInfo(@"c:\my.exe");
Process p = fi.Run("arg1", 23, true);
p = fi.Run(true);
p = fi.Run();
In this case "my.exe" has metadata that understands all valid parameter
names and there types. It also understands parameter sets which can be
thought of as static constructor overloads to pass to the Exe. Now when I
type "fi.Run(" - I get a list of the valid overloads that can be used to
start the Exe. Same kind of thing could be used for any document type, txt,
doc (etc), with methods and properties in the context of that document type.
strong typing and operations over a objects and tables, you could use the
same method to operate over files and directories.
So within VS or at the Command Line I could start type:
\temp\dir\file.txt
And get intellisense as I go with filenames and directory names relative to
the current context.
More importantly, if EXEs supported metadata for arguments (similar to Monad
CmdLets), then you could get dynamic overloads for the parameter sets.
Something like:
FileInfo fi = new FileInfo(@"c:\my.exe");
Process p = fi.Run("arg1", 23, true);
p = fi.Run(true);
p = fi.Run();
In this case "my.exe" has metadata that understands all valid parameter
names and there types. It also understands parameter sets which can be
thought of as static constructor overloads to pass to the Exe. Now when I
type "fi.Run(" - I get a list of the valid overloads that can be used to
start the Exe. Same kind of thing could be used for any document type, txt,
doc (etc), with methods and properties in the context of that document type.