![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | About Creating ParameterSets for a function Ok, the subject says it all... How can I create parametersets for a function? I have no clue how to get started nor was I able to find any documents on this... |
My System Specs![]() |
| | #2 (permalink) |
| | Re: About Creating ParameterSets for a function Unfortunately we don't support this in V1 but it's high on the list for the next version. -- Bruce Payette [MSFT] Windows PowerShell Technical Lead Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "dance2die" <dance2die@discussions.microsoft.com> wrote in message news:462C480C-6CD7-4D2B-96CF-DAD2749CA5DC@microsoft.com... > Ok, the subject says it all... > How can I create parametersets for a function? > > I have no clue how to get started nor was I able to find any documents on > this... > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: About Creating ParameterSets for a function thank you for clearing that up, bruce. By the way, that means, i would have to work around this problem i have... I am basically trying to return a DataAdater of different types depending on .NET data provider name(SqlClient, OleDb, etc). But, overloaded DataAdaters Construtors take different parameters. e.g.) 1. command object 2. command text and connection 3. command text and connection string What would be a best practice to accept those distinct sets of data without using parametersets? "Bruce Payette [MSFT]" wrote: > Unfortunately we don't support this in V1 but it's high on the list for the > next version. > > -- > Bruce Payette [MSFT] > Windows PowerShell Technical Lead > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > "dance2die" <dance2die@discussions.microsoft.com> wrote in message > news:462C480C-6CD7-4D2B-96CF-DAD2749CA5DC@microsoft.com... > > Ok, the subject says it all... > > How can I create parametersets for a function? > > > > I have no clue how to get started nor was I able to find any documents on > > this... > > > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: About Creating ParameterSets for a function the best I could come up with ($o1,$o2,$o3 = $args for CLI testing}: a double Switch : PoSH>$o1 = 'foo' PoSH>$o2 = 'Bar' PoSH>Switch (@($o1,$o2,$o3 |? {$_ -ne $null}).count) { >> 1 {if ($o1 -ne 0){"1 parameter o1 filled"}} >> 2 {if ($o1 -ne 0){"2 parameter o1 filled"}} >> } >> 2 parameter o1 filled gr /\/\o\/\/ dance2die wrote: > thank you for clearing that up, bruce. > By the way, that means, i would have to work around this problem i have... > I am basically trying to return a DataAdater of different types > depending on .NET data provider name(SqlClient, OleDb, etc). > But, overloaded DataAdaters Construtors take different parameters. > e.g.) > 1. command object > 2. command text and connection > 3. command text and connection string > What would be a best practice to accept those distinct sets of data without > using parametersets? > > > "Bruce Payette [MSFT]" wrote: > >> Unfortunately we don't support this in V1 but it's high on the list for the >> next version. >> >> -- >> Bruce Payette [MSFT] >> Windows PowerShell Technical Lead >> Microsoft Corporation >> This posting is provided "AS IS" with no warranties, and confers no rights. >> >> >> >> "dance2die" <dance2die@discussions.microsoft.com> wrote in message >> news:462C480C-6CD7-4D2B-96CF-DAD2749CA5DC@microsoft.com... >>> Ok, the subject says it all... >>> How can I create parametersets for a function? >>> >>> I have no clue how to get started nor was I able to find any documents on >>> this... >>> >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| function to delete a function | PowerShell | |||
| function not working dispite working outside the function block | PowerShell | |||
| help about function | PowerShell | |||
| BUG: Redirecting function contents to a file truncates function lines at the width of the console | PowerShell | |||