protected override void ProcessRecord()
        {
            var result = AudioMetadataEncoderManager.GetEncoderInfo();

            ProcessLogMessages();
            WriteObject(result, true);
        }
 protected override void BeginProcessing()
 {
     if (Format != null)
     {
         _expectedExtension = AudioMetadataEncoderManager.GetEncoderInfo()
                              .FirstOrDefault(info => info.Format.Equals(Format, StringComparison.OrdinalIgnoreCase))?.Extension;
     }
 }
Пример #3
0
        public IEnumerable <CompletionResult> CompleteArgument(
            string commandName,
            string parameterName,
            string wordToComplete,
            CommandAst commandAst,
            IDictionary fakeBoundParameters)
        {
            var pattern = new WildcardPattern($"{wordToComplete}*", WildcardOptions.IgnoreCase);

            return(AudioMetadataEncoderManager.GetEncoderInfo()
                   .Where(info => pattern.IsMatch(info.Format))
                   .Select(info => new CompletionResult(
                               info.Format,
                               info.Format,
                               CompletionResultType.ParameterValue,
                               info.Description)));
        }