/// <summary>
        /// Get cmdlets from the given assembly
        /// </summary>
        /// <param name="assemblyPath"></param>
        /// <returns></returns>
        public IList <CmdletSignatureMetadata> GetCmdlets(string assemblyPath)
        {
            IList <CmdletSignatureMetadata> result = new List <CmdletSignatureMetadata>();

            try
            {
                var assembly = Assembly.LoadFrom(assemblyPath);
                foreach (var type in assembly.GetCmdletTypes())
                {
                    var cmdlet     = type.GetAttribute <CmdletAttribute>();
                    var outputs    = type.GetAttributes <OutputTypeAttribute>();
                    var parameters = type.GetParameters();

                    var cmdletMetadata = new CmdletSignatureMetadata
                    {
                        VerbName              = cmdlet.VerbName,
                        NounName              = cmdlet.NounName,
                        ConfirmImpact         = cmdlet.ConfirmImpact,
                        SupportsShouldProcess = cmdlet.SupportsShouldProcess,
                        ClassName             = type.FullName
                    };
                    foreach (var output in outputs)
                    {
                        foreach (var outputType in output.Type)
                        {
                            var outputMetadata = new OutputMetadata
                            {
                                Type = outputType.Type
                            };
                            outputMetadata.ParameterSets.AddRange(output.ParameterSetName);
                        }
                    }

                    foreach (var parameter in parameters)
                    {
                        if (parameter.Name == "Force" && parameter.PropertyType == typeof(SwitchParameter))
                        {
                            cmdletMetadata.HasForceSwitch = true;
                        }

                        var parameterData = new ParameterMetadata
                        {
                            Type = parameter.PropertyType,
                            Name = parameter.Name
                        };
                        if (parameter.HasAttribute <AliasAttribute>())
                        {
                            var aliases = parameter.GetAttributes <AliasAttribute>();
                            parameterData.AliasList.AddRange(
                                aliases.SelectMany(a => a.AliasNames));
                        }

                        cmdletMetadata.Parameters.Add(parameterData);
                    }

                    result.Add(cmdletMetadata);
                }
            }
            catch
            {
            }

            return(result);
        }
        /// <summary>
        /// Get cmdlets from the given assembly
        /// </summary>
        /// <param name="assemblyPath"></param>
        /// <returns></returns>
        public IList<CmdletSignatureMetadata> GetCmdlets(string assemblyPath)
        {
            IList<CmdletSignatureMetadata> result = new List<CmdletSignatureMetadata>();
            try
            {
                var assembly = Assembly.LoadFrom(assemblyPath);
                foreach (var type in assembly.GetCmdletTypes())
                {
                    var cmdlet = type.GetAttribute<CmdletAttribute>();
                    var outputs = type.GetAttributes<OutputTypeAttribute>();
                    var parameters = type.GetParameters();

                    var cmdletMetadata = new CmdletSignatureMetadata
                    {
                        VerbName = cmdlet.VerbName,
                        NounName = cmdlet.NounName,
                        ConfirmImpact = cmdlet.ConfirmImpact,
                        SupportsShouldProcess = cmdlet.SupportsShouldProcess,
                        ClassName = type.FullName,
                        AssemblyName = assembly.FullName
                    };
                    foreach (var output in outputs)
                    {
                        foreach (var outputType in output.Type)
                        {
                            var outputMetadata = new OutputMetadata
                            {
                                Type = outputType.Type
                            };
                            outputMetadata.ParameterSets.AddRange(output.ParameterSetName);
                        }
                    }

                    foreach (var parameter in parameters)
                    {
                        if ( parameter.Name == "Force" && parameter.PropertyType == typeof (SwitchParameter))
                        {
                            cmdletMetadata.HasForceSwitch = true;
                        }

                        var parameterData = new ParameterMetadata
                        {
                            Type = parameter.PropertyType,
                            Name = parameter.Name
                        };
                        if (parameter.HasAttribute<AliasAttribute>())
                        {
                            var aliases = parameter.GetAttributes<AliasAttribute>();
                            parameterData.AliasList.AddRange(
                                aliases.SelectMany(a => a.AliasNames));
                        }

                        cmdletMetadata.Parameters.Add(parameterData);
                    }

                    result.Add(cmdletMetadata);
                }
            }
            catch
            {
            }

            return result;
        }