Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,26 +168,15 @@ internal static CompletionResult Null
/// <param name="toolTip">The text for the tooltip with details to be displayed about the object.</param>
public CompletionResult(string completionText, string listItemText, CompletionResultType resultType, string toolTip)
{
if (string.IsNullOrEmpty(completionText))
{
throw PSTraceSource.NewArgumentNullException(nameof(completionText));
}

if (string.IsNullOrEmpty(listItemText))
{
throw PSTraceSource.NewArgumentNullException(nameof(listItemText));
}
ArgumentException.ThrowIfNullOrEmpty(completionText);
ArgumentException.ThrowIfNullOrEmpty(listItemText);
ArgumentException.ThrowIfNullOrEmpty(toolTip);

if (resultType < CompletionResultType.Text || resultType > CompletionResultType.DynamicKeyword)
{
throw PSTraceSource.NewArgumentOutOfRangeException(nameof(resultType), resultType);
}

if (string.IsNullOrEmpty(toolTip))
{
throw PSTraceSource.NewArgumentNullException(nameof(toolTip));
}

_completionText = completionText;
_listItemText = listItemText;
_toolTip = toolTip;
Expand Down
Loading