Skip to content

Sites

Type 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

Members

Properties

Property Type Summary
Count int Gets the number of Sites contained in the collection.
this[] ISIAPISite Get the Site from the collection by the Site name.
this[] ISIAPISite Get the Site at the specified index.

Methods

Method Returns Summary
SiteExists(string) bool Queries whether a particular Site exists in the collection by its name.
GetSiteByID(string) ISIAPISite Get the Site by its GUID.

Properties

Count

Gets the number of Sites contained in the collection.

int Count { get; }

Type int

Code samples
int count = sites.Count;
long count;
sites->get_Count(&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[];
CComPtr<ISIAPISite> this[];
sites->get_this[](&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[];
CComPtr<ISIAPISite> this[];
sites->get_this[](&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");
VARIANT_BOOL result;
sites->SiteExists(CComBSTR(L"Main Intersection"), &result);
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");
CComPtr<ISIAPISite> result;
sites->GetSiteByID(CComBSTR(L"id-1"), &result);
result = sites.GetSiteByID(r"id-1")
$result = $sites.GetSiteByID("id-1")