NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Common.IO.OptionValueCollection Class Reference
Inheritance diagram for Ntp.Common.IO.OptionValueCollection:
Collaboration diagram for Ntp.Common.IO.OptionValueCollection:

Public Member Functions

void Add (string item)
 
void Clear ()
 
bool Contains (string item)
 
void CopyTo (string[] array, int arrayIndex)
 
IEnumerator< string > GetEnumerator ()
 
int IndexOf (string item)
 
void Insert (int index, string item)
 
bool Remove (string item)
 
void RemoveAt (int index)
 
string[] ToArray ()
 
List< string > ToList ()
 
override string ToString ()
 

Public Attributes

int Count => values.Count
 
bool IsReadOnly => false
 

Package Functions

 OptionValueCollection (OptionContext c)
 

Properties

object IList. this[int index] [get, set]
 
string this[int index] [get, set]
 

Private Member Functions

int IList. Add (object value)
 
void AssertValid (int index)
 
bool IList. Contains (object value)
 
void ICollection. CopyTo (Array array, int index)
 
IEnumerator IEnumerable. GetEnumerator ()
 
int IList. IndexOf (object value)
 
void IList. Insert (int index, object value)
 
void IList. Remove (object value)
 
void IList. RemoveAt (int index)
 

Private Attributes

readonly OptionContext c
 
bool IList. IsFixedSize => false
 
bool ICollection. IsSynchronized => (values as ICollection).IsSynchronized
 
object ICollection. SyncRoot => (values as ICollection).SyncRoot
 
readonly List< string > values = new List<string>()
 

Detailed Description

Definition at line 251 of file Options.cs.

Constructor & Destructor Documentation

Ntp.Common.IO.OptionValueCollection.OptionValueCollection ( OptionContext  c)
inlinepackage

Definition at line 253 of file Options.cs.

References c.

254  {
255  this.c = c;
256  }
readonly OptionContext c
Definition: Options.cs:258

Member Function Documentation

void Ntp.Common.IO.OptionValueCollection.Add ( string  item)
inline

Definition at line 309 of file Options.cs.

Referenced by Ntp.Common.IO.OptionSet.Invoke(), Ntp.Common.IO.OptionSet.Parse(), Ntp.Common.IO.OptionSet.ParseBool(), and Ntp.Common.IO.OptionSet.Unprocessed().

310  {
311  values.Add(item);
312  }
readonly List< string > values
Definition: Options.cs:260

Here is the caller graph for this function:

int IList. Ntp.Common.IO.OptionValueCollection.Add ( object  value)
inlineprivate

Definition at line 341 of file Options.cs.

342  {
343  return (values as IList).Add(value);
344  }
readonly List< string > values
Definition: Options.cs:260
void Ntp.Common.IO.OptionValueCollection.AssertValid ( int  index)
inlineprivate

Definition at line 398 of file Options.cs.

399  {
400  if (c.Option == null)
401  throw new InvalidOperationException("OptionContext.Option is null.");
402  if (index >= c.Option.MaxValueCount)
403  throw new ArgumentOutOfRangeException(nameof(index));
404  if (c.Option.OptionValueType == OptionValueType.Required &&
405  index >= values.Count)
406  throw new OptionException(string.Format(
407  c.OptionSet.MessageLocalizer("Missing required value for option '{0}'."), c.OptionName),
408  c.OptionName);
409  }
readonly List< string > values
Definition: Options.cs:260
OptionValueType OptionValueType
Definition: Options.cs:513
readonly OptionContext c
Definition: Options.cs:258
MessageLocalizerConverter MessageLocalizer
Definition: Options.cs:807
void Ntp.Common.IO.OptionValueCollection.Clear ( )
inline

Definition at line 314 of file Options.cs.

Referenced by Ntp.Common.IO.Option.Invoke().

315  {
316  values.Clear();
317  }
readonly List< string > values
Definition: Options.cs:260

Here is the caller graph for this function:

bool Ntp.Common.IO.OptionValueCollection.Contains ( string  item)
inline

Definition at line 319 of file Options.cs.

320  {
321  return values.Contains(item);
322  }
readonly List< string > values
Definition: Options.cs:260
bool IList. Ntp.Common.IO.OptionValueCollection.Contains ( object  value)
inlineprivate

Definition at line 346 of file Options.cs.

347  {
348  return (values as IList).Contains(value);
349  }
readonly List< string > values
Definition: Options.cs:260
void ICollection. Ntp.Common.IO.OptionValueCollection.CopyTo ( Array  array,
int  index 
)
inlineprivate

Definition at line 297 of file Options.cs.

298  {
299  (values as ICollection).CopyTo(array, index);
300  }
readonly List< string > values
Definition: Options.cs:260
void ICollection. CopyTo(Array array, int index)
Definition: Options.cs:297
void Ntp.Common.IO.OptionValueCollection.CopyTo ( string[]  array,
int  arrayIndex 
)
inline

Definition at line 324 of file Options.cs.

325  {
326  values.CopyTo(array, arrayIndex);
327  }
readonly List< string > values
Definition: Options.cs:260
IEnumerator IEnumerable. Ntp.Common.IO.OptionValueCollection.GetEnumerator ( )
inlineprivate

Definition at line 264 of file Options.cs.

265  {
266  return values.GetEnumerator();
267  }
readonly List< string > values
Definition: Options.cs:260
IEnumerator<string> Ntp.Common.IO.OptionValueCollection.GetEnumerator ( )
inline

Definition at line 273 of file Options.cs.

274  {
275  return values.GetEnumerator();
276  }
readonly List< string > values
Definition: Options.cs:260
int IList. Ntp.Common.IO.OptionValueCollection.IndexOf ( object  value)
inlineprivate

Definition at line 351 of file Options.cs.

352  {
353  return (values as IList).IndexOf(value);
354  }
readonly List< string > values
Definition: Options.cs:260
int Ntp.Common.IO.OptionValueCollection.IndexOf ( string  item)
inline

Definition at line 383 of file Options.cs.

384  {
385  return values.IndexOf(item);
386  }
readonly List< string > values
Definition: Options.cs:260
void IList. Ntp.Common.IO.OptionValueCollection.Insert ( int  index,
object  value 
)
inlineprivate

Definition at line 356 of file Options.cs.

357  {
358  (values as IList).Insert(index, value);
359  }
readonly List< string > values
Definition: Options.cs:260
void IList. Insert(int index, object value)
Definition: Options.cs:356
void Ntp.Common.IO.OptionValueCollection.Insert ( int  index,
string  item 
)
inline

Definition at line 388 of file Options.cs.

389  {
390  values.Insert(index, item);
391  }
readonly List< string > values
Definition: Options.cs:260
bool Ntp.Common.IO.OptionValueCollection.Remove ( string  item)
inline

Definition at line 329 of file Options.cs.

330  {
331  return values.Remove(item);
332  }
readonly List< string > values
Definition: Options.cs:260
void IList. Ntp.Common.IO.OptionValueCollection.Remove ( object  value)
inlineprivate

Definition at line 361 of file Options.cs.

362  {
363  (values as IList).Remove(value);
364  }
readonly List< string > values
Definition: Options.cs:260
void IList. Ntp.Common.IO.OptionValueCollection.RemoveAt ( int  index)
inlineprivate

Definition at line 366 of file Options.cs.

367  {
368  (values as IList).RemoveAt(index);
369  }
readonly List< string > values
Definition: Options.cs:260
void IList. RemoveAt(int index)
Definition: Options.cs:366
void Ntp.Common.IO.OptionValueCollection.RemoveAt ( int  index)
inline

Definition at line 393 of file Options.cs.

394  {
395  values.RemoveAt(index);
396  }
readonly List< string > values
Definition: Options.cs:260
string [] Ntp.Common.IO.OptionValueCollection.ToArray ( )
inline

Definition at line 280 of file Options.cs.

281  {
282  return values.ToArray();
283  }
readonly List< string > values
Definition: Options.cs:260
List<string> Ntp.Common.IO.OptionValueCollection.ToList ( )
inline

Definition at line 285 of file Options.cs.

286  {
287  return new List<string>(values);
288  }
readonly List< string > values
Definition: Options.cs:260
override string Ntp.Common.IO.OptionValueCollection.ToString ( )
inline

Definition at line 290 of file Options.cs.

291  {
292  return string.Join(", ", values.ToArray());
293  }
readonly List< string > values
Definition: Options.cs:260

Member Data Documentation

readonly OptionContext Ntp.Common.IO.OptionValueCollection.c
private

Definition at line 258 of file Options.cs.

int Ntp.Common.IO.OptionValueCollection.Count => values.Count

Definition at line 334 of file Options.cs.

bool IList. Ntp.Common.IO.OptionValueCollection.IsFixedSize => false
private

Definition at line 371 of file Options.cs.

bool Ntp.Common.IO.OptionValueCollection.IsReadOnly => false

Definition at line 335 of file Options.cs.

bool ICollection. Ntp.Common.IO.OptionValueCollection.IsSynchronized => (values as ICollection).IsSynchronized
private

Definition at line 302 of file Options.cs.

object ICollection. Ntp.Common.IO.OptionValueCollection.SyncRoot => (values as ICollection).SyncRoot
private

Definition at line 303 of file Options.cs.

readonly List<string> Ntp.Common.IO.OptionValueCollection.values = new List<string>()
private

Definition at line 260 of file Options.cs.

Property Documentation

object IList. Ntp.Common.IO.OptionValueCollection.this[int index]
getsetprivate

Definition at line 374 of file Options.cs.

string Ntp.Common.IO.OptionValueCollection.this[int index]
getset

Definition at line 412 of file Options.cs.


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