Class WebsiteService
Inheritance
System.Object
WebsiteService
Implements
Namespace: DirectScale.Disco.Extension.Services
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public class WebsiteService : Object, IWebsiteService
Constructors
WebsiteService(IApiService)
Declaration
public WebsiteService(IApiService apiService)
Parameters
| Type | Name | Description |
|---|---|---|
| IApiService | apiService |
Methods
CreateWebsite(Int32, String, String, Int32, Int32)
Creates a WebAlias and website for this associate.
Declaration
public Task CreateWebsite(int associateId, string url, string homePage, int subscriptionId, int status)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | associateId | |
| System.String | url | |
| System.String | homePage | |
| System.Int32 | subscriptionId | |
| System.Int32 | status |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
GetPreferenceValue(Int32, String)
Gets an associate's configured setting for preferenceKey.
Declaration
public Task<string> GetPreferenceValue(int associateId, string preferenceKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | associateId | The associate with preferences. |
| System.String | preferenceKey | The specific setting to get a value for. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | The value the associate has chosen for |
GetWebSites(Int32)
Gets the associate's websites.
Declaration
public Task<WebsiteInfo[]> GetWebSites(int associateId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | associateId | Associate to get websites for. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<WebsiteInfo[]> | Array of websites configured for associate. |
UpdatePreferenceValue(Int32, String, String)
This stores an associate's personal settings as key-value preferences.
Declaration
public Task UpdatePreferenceValue(int associateId, string preferenceKey, string preferenceValue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | associateId | The associate with a preference. |
| System.String | preferenceKey | The name of the setting. |
| System.String | preferenceValue | The associate's chosen setting. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
ValidateURL(String)
Checks if the supplied url has valid characters and is not yet in use.
Declaration
public Task<bool> ValidateURL(string url)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | url | The unique url to validate. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if valid. |