Class CompletionGraph
A text completion graph that can be filled with a list of strings.
Inherited Members
Namespace: Ritchie.Toolbox.Niceities.Completions
Assembly: Ritchie.Toolbox.dll
Syntax
public class CompletionGraph : ICollection<string>, IEnumerable<string>, IEnumerable
Properties
CompletionsAreDirty
Gets a value indicating whether the completion graph is dirty.
Declaration
public bool CompletionsAreDirty { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
If this value is equal to true, then the next completion query will be slow. This is because the completion graph will need to be refreshed before the query can be completed.
Count
Gets the number of elements contained in the ICollection<T>.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int | The number of elements contained in the ICollection<T>. |
IsReadOnly
Gets a value indicating whether the ICollection<T> is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool | true if the ICollection<T> is read-only; otherwise, false. |
Methods
Add(string)
Adds an item to the ICollection<T>.
Declaration
public void Add(string item)
Parameters
Type | Name | Description |
---|---|---|
string | item | The object to add to the ICollection<T>. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The ICollection<T> is read-only. |
Clear()
Removes all items from the ICollection<T>.
Declaration
public void Clear()
Exceptions
Type | Condition |
---|---|
NotSupportedException | The ICollection<T> is read-only. |
Contains(string)
Determines whether the ICollection<T> contains a specific value.
Declaration
public bool Contains(string item)
Parameters
Type | Name | Description |
---|---|---|
string | item | The object to locate in the ICollection<T>. |
Returns
Type | Description |
---|---|
bool | true if |
CopyTo(string[], int)
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
Declaration
public void CopyTo(string[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
string[] | array | The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing. |
int | arrayIndex | The zero-based index in |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentOutOfRangeException |
|
ArgumentException | The number of elements in the source ICollection<T> is greater than the available space from |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<string> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<string> | An enumerator that can be used to iterate through the collection. |
GetPossibleCompletions(string)
Declaration
public IEnumerable<string> GetPossibleCompletions(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text |
Returns
Type | Description |
---|---|
IEnumerable<string> |
RefreshGraph()
Refreshes the completion graph if it is dirty.
Declaration
public void RefreshGraph()
See Also
Remove(string)
Removes the first occurrence of a specific object from the ICollection<T>.
Declaration
public bool Remove(string item)
Parameters
Type | Name | Description |
---|---|---|
string | item | The object to remove from the ICollection<T>. |
Returns
Type | Description |
---|---|
bool | true if |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The ICollection<T> is read-only. |