Class CSharpVsaItems
Implements an interface for a collection of IVsaItem objects, which can be addressed either by name or by index.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Scripting
Assembly: Syncfusion.Scripting.Base.dll
Syntax
public class CSharpVsaItems : IVsaItems, IEnumerable
Constructors
CSharpVsaItems(CSharpScriptEngine)
Construct a CSharpVsaItems given a script engine.
Declaration
public CSharpVsaItems(CSharpScriptEngine engine)
Parameters
Type | Name | Description |
---|---|---|
CSharpScriptEngine | engine |
Properties
Count
Gets the number of items in the specified collection.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
Item[Int32]
Gets an item from the collection by its index value.
Declaration
public IVsaItem this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
Microsoft.Vsa.IVsaItem |
Item[String]
Gets an item from the collection by its name.
Declaration
public IVsaItem this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type |
---|
Microsoft.Vsa.IVsaItem |
Methods
ContainsName(String)
Checks if contains item with specified name.
Declaration
public bool ContainsName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Item name. |
Returns
Type | Description |
---|---|
System.Boolean | tru if item exists or false if not |
CreateItem(String, VsaItemType, VsaItemFlag)
Creates a new instance of one of the IVsaItem types, as defined in the VsaItemType enumeration.
Declaration
public IVsaItem CreateItem(string name, VsaItemType itemType, VsaItemFlag itemFlag)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name to associate with the new item |
Microsoft.Vsa.VsaItemType | itemType | The type of item created, as defined in the VsaItemType enumeration |
Microsoft.Vsa.VsaItemFlag | itemFlag | The optional flag to specify the initial content of a Code item. |
Returns
Type | Description |
---|---|
Microsoft.Vsa.IVsaItem | Returns a reference to the IVsaItem object created |
GetEnumerator()
Gets the VsaItems enumerator.
Declaration
public IEnumerator GetEnumerator()
Returns
Type |
---|
System.Collections.IEnumerator |
Remove(Int32)
Removes an item from the collection.
Declaration
public void Remove(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |