Skip to content

ISIAPISites Interface

Namespace: SIDRASolutions.SI.API
Assembly: SIDRASolutions.SI.API.dll COM CLSID: 625B0EF4-D136-4519-ABEF-8D442950790A

Site collection wrapper interface

Declaration

[Guid("625B0EF4-D136-4519-ABEF-8D442950790A")]
public interface ISIAPISites

Get an instance

// Navigate to the ISIAPISites you need via the ISIAPI tree.
// See ISIAPI for the activation root.
var sites = /* ... */;
' Navigate to the ISIAPISites you need via the ISIAPI tree.
' See ISIAPI for the activation root.
Dim sites As ISIAPISites = Nothing
# Navigate to the ISIAPISites you need via the ISIAPI tree.
# See ISIAPI for the activation root.
sites = ...
# Navigate to the ISIAPISites you need via the ISIAPI tree.
# See ISIAPI for the activation root.
$sites = $null

Properties

Count

Gets the number of Sites contained in the collection.

int Count { get; }

Type int

Code samples
int count = sites.Count;
Dim count As Integer = sites.Count
count = sites.Count
$count = $sites.Count

this[]

Get the Site from the collection by the Site name.

ISIAPISite this[] { get; }

Type ISIAPISite

Remarks

The Site name is not unique in the collection. It is possible that more than one Site has the same name. The first Site found by name is returned. If no Site is found, null / Nothing is returned.

In C#, use ISIAPISites[] to get a Site by its name or its position in the collection.
In VBA, use Item() to get a Site by its name or use Item_2() to get by its position.
In C++, use get_Item() to get a Site by its name or use get_Item_2() by its position.

Code samples
var this[] = sites.this[];
Dim this[] As ISIAPISite = sites.this[]
this[] = sites.this[]
$this[] = $sites.this[]

this[]

Get the Site at the specified index.

ISIAPISite this[] { get; }

Type ISIAPISite

Remarks

In C#, use ISIAPISites[] to get a Site by its name or its position in the collection.
In VBA, use Item() to get a Site by its name or use Item_2() to get by its position.
In C++, use get_Item() to get a Site by its name or use get_Item_2() by its position.

Code samples
var this[] = sites.this[];
Dim this[] As ISIAPISite = sites.this[]
this[] = sites.this[]
$this[] = $sites.this[]

Methods

SiteExists(string)

Queries whether a particular Site exists in the collection by its name.

bool SiteExists(string sitename)

Parameters

Name Type Description
sitename string Site name to query

Returns bool - True, if any Site with the given name exists in the collection. False otherwise

Remarks

The Site name is not unique in the collection. It is possible that more than one Site has the same name.

Code samples
bool result = sites.SiteExists(@"Main Intersection");
Dim result As Boolean = sites.SiteExists("Main Intersection")
result = sites.SiteExists(r"Main Intersection")
$result = $sites.SiteExists("Main Intersection")

GetSiteByID(string)

Get the Site by its GUID.

ISIAPISite GetSiteByID(string site_id)

Parameters

Name Type Description
site_id string The GUID of the Site object, i.e. ISIAPISite.Site_id. This is different from the "Site ID" in the Intersection dialog, i.e. ISIAPISite.Intersectionid.

Returns ISIAPISite

Code samples
var result = sites.GetSiteByID(@"id-1");
Dim result As ISIAPISite = sites.GetSiteByID("id-1")
result = sites.GetSiteByID(r"id-1")
$result = $sites.GetSiteByID("id-1")