public static FromString ( string stringValue ) : |
||
stringValue | string | the result string |
Результат |
public override bool CanAssist(RichCommandLineContext context) { if (context.CurrentTokenIndex == 0 && Definition.Actions.Count > 0) { Options.Clear(); Options.AddRange(Definition.Actions.Select(a => ContextAssistSearchResult.FromString(a.DefaultAlias))); return(true); } else { return(false); } }
public override bool CanAssist(RichCommandLineContext context) { if (TargetArgument != null && TargetArgument.ArgumentType.IsEnum) { Options.Clear(); Options.AddRange(Enum.GetNames(TargetArgument.ArgumentType).Select(name => ContextAssistSearchResult.FromString(name))); return(true); } else { return(false); } }