Struct SqlDatabaseNamedObjectsSet<T>
Represents a set of named SqlObjectBuilder instances.
public readonly struct SqlDatabaseNamedObjectsSet<T> where T : SqlObjectBuilder
Type Parameters
T
SQL object builder type.
- Inherited Members
Properties
Count
Number of elements in this set.
public int Count { get; }
Property Value
Methods
Add(string, T)
Attempts to add the provided obj
to this set.
public bool Add(string name, T obj)
Parameters
name
stringName of the object.
obj
TObject to add.
Returns
- bool
true when object was added, otherwise false.
Clear()
Removes all objects from this set.
public void Clear()
Create()
Creates a new empty SqlDatabaseNamedObjectsSet<T> instance.
[Pure]
public static SqlDatabaseNamedObjectsSet<T> Create()
Returns
- SqlDatabaseNamedObjectsSet<T>
New SqlDatabaseNamedObjectsSet<T> instance.
GetEnumerator()
Creates a new enumerator for this set.
[Pure]
public SqlDatabaseNamedObjectsSet<T>.Enumerator GetEnumerator()
Returns
- SqlDatabaseNamedObjectsSet<T>.Enumerator
New enumerator.
Remove(string)
Attempts to remove an object by its name
from this set.
public T? Remove(string name)
Parameters
name
stringName of the object to remove.
Returns
- T
Removed object or null when it does not exist.
TryGetObject(string)
Attempts to retrieve an object associated with the provided name
from this set.
[Pure]
public T? TryGetObject(string name)
Parameters
name
stringName of the object to retrieve.
Returns
- T
Existing object or null when it does not exist.