Class NamedSet
Represents a named collection of EntityObjects.
Inheritance
Inherited Members
Namespace: TimeCockpit.Data
Assembly: TimeCockpit.Data.dll
Syntax
public class NamedSet : IEnumerable<EntityObject>, IEnumerable
Properties
Definition
Gets or sets the definition of the NamedSet.
Declaration
public NamedSetDefinition Definition { get; set; }
Property Value
Type | Description |
---|---|
NamedSetDefinition |
Name
Gets the name of the NamedSet.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Create(NamedSetDefinition, IEnumerable<EntityObject>)
Creates an instance of a NamedSet basing on the specified definition
Declaration
public static NamedSet Create(NamedSetDefinition definition, IEnumerable<EntityObject> entityObjects)
Parameters
Type | Name | Description |
---|---|---|
NamedSetDefinition | definition | The definition that determines the NamedSet. |
System.Collections.Generic.IEnumerable<EntityObject> | entityObjects | The entity objects that represent the result of an executed NamedSet. |
Returns
Type | Description |
---|---|
NamedSet | Returns a new instance of NamedSet |
Create(NamedSetDefinition, IDataContext, Environment)
Creates an instance of a NamedSet basing on the specified definition
Declaration
public static NamedSet Create(NamedSetDefinition definition, IDataContext context, Environment environment)
Parameters
Type | Name | Description |
---|---|---|
NamedSetDefinition | definition | The definition that determines the NamedSet. |
IDataContext | context | The DataContext upon which to fetch the NamedSet. |
Environment | environment | The environment. |
Returns
Type | Description |
---|---|
NamedSet | An instance of NamedSet |
GetEnumerator()
Gets the enumerator.
Declaration
public IEnumerator<EntityObject> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<EntityObject> | An System.Collections.IEnumerator[EntityObject] object that can be used to iterate through the collection. |
Implements
Refresh(DataContext, Environment)
Refreshes the current instance of the NamedSet according its NamedSetDefinition.
Declaration
public void Refresh(DataContext context, Environment environment)
Parameters
Type | Name | Description |
---|---|---|
DataContext | context | The DataContext upon which to refresh the NamedSet. |
Environment | environment | The environment. |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |