NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Common.IO.ArgumentSource Class Referenceabstract
Inheritance diagram for Ntp.Common.IO.ArgumentSource:

Public Member Functions

abstract bool GetArguments (string value, out IEnumerable< string > replacement)
 
abstract string[] GetNames ()
 

Static Public Member Functions

static IEnumerable< string > GetArguments (TextReader reader)
 
static IEnumerable< string > GetArgumentsFromFile (string file)
 

Properties

abstract string Description [get]
 

Static Private Member Functions

static IEnumerable< string > GetArguments (TextReader reader, bool close)
 

Detailed Description

Definition at line 654 of file Options.cs.

Member Function Documentation

abstract bool Ntp.Common.IO.ArgumentSource.GetArguments ( string  value,
out IEnumerable< string >  replacement 
)
pure virtual
static IEnumerable<string> Ntp.Common.IO.ArgumentSource.GetArguments ( TextReader  reader)
inlinestatic

Definition at line 659 of file Options.cs.

660  {
661  return GetArguments(reader, false);
662  }
abstract bool GetArguments(string value, out IEnumerable< string > replacement)
static IEnumerable<string> Ntp.Common.IO.ArgumentSource.GetArguments ( TextReader  reader,
bool  close 
)
inlinestaticprivate

Definition at line 672 of file Options.cs.

References c.

673  {
674  try
675  {
676  var arg = new StringBuilder();
677 
678  string line;
679  while ((line = reader.ReadLine()) != null)
680  {
681  var t = line.Length;
682 
683  for (var i = 0; i < t; i++)
684  {
685  var c = line[i];
686 
687  if (c == '"' || c == '\'')
688  {
689  var end = c;
690 
691  for (i++; i < t; i++)
692  {
693  c = line[i];
694 
695  if (c == end)
696  break;
697  arg.Append(c);
698  }
699  }
700  else if (c == ' ')
701  {
702  if (arg.Length > 0)
703  {
704  yield return arg.ToString();
705  arg.Length = 0;
706  }
707  }
708  else
709  arg.Append(c);
710  }
711  if (arg.Length > 0)
712  {
713  yield return arg.ToString();
714  arg.Length = 0;
715  }
716  }
717  }
718  finally
719  {
720  if (close)
721  reader.Dispose();
722  }
723  }
d d d prototype close
Definition: bootstrap.min.js:6
var c
Definition: bootstrap.min.js:6
static IEnumerable<string> Ntp.Common.IO.ArgumentSource.GetArgumentsFromFile ( string  file)
inlinestatic

Definition at line 664 of file Options.cs.

665  {
666  return GetArguments(File.OpenText(file), true);
667  }
abstract bool GetArguments(string value, out IEnumerable< string > replacement)
abstract string [] Ntp.Common.IO.ArgumentSource.GetNames ( )
pure virtual

Property Documentation

abstract string Ntp.Common.IO.ArgumentSource.Description
get

Definition at line 656 of file Options.cs.


The documentation for this class was generated from the following file: