VisibilityOfCommand

The function named Reflect-Visibility sets the visibility of the commands and the functions.
The users can handle the visibility of the functions by the lines of follows.

#VISIBILITY:public
#VISIBILITY:private

Like this:
function global:MyPublicFunction()
#VISIBILITY:public
{
   Write-Host "This is public function";
}
function global:MyPrivateFunction()
#VISIBILITY:private
{
    Write-Host "This is not public function";
}
Reflect-Visibility reads all of the functions and seek the lines of #VISIBILITY:public, and write public function names in public_func.txt.
public_func.txt is in SALADROOT.definition.system.publiccommand.

Last edited Mar 2, 2013 at 1:13 PM by Tom__S, version 10

Comments

No comments yet.