Пример #1
0
        /// <summary>
        /// This method constructs a string representing the begin block of the command
        /// specified by <paramref name="commandMetadata"/>.  The returned string only contains the
        /// script, it is not enclosed in "begin { }".
        /// </summary>
        /// <param name="commandMetadata">
        /// An instance of CommandMetadata representing a command.
        /// </param>
        /// <returns>
        /// A string representing the begin block of the command.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        /// commandMetadata is null.
        /// </exception>
        public static string GetBegin(CommandMetadata commandMetadata)
        {
            if (commandMetadata == null)
            {
                throw PSTraceSource.NewArgumentNullException("commandMetaData");
            }

            return(commandMetadata.GetBeginBlock());
        }