Class AbstractPublisher
Publishers are meant to publish a player and or product to a specified end-point.
Namespace: Unity.Industrial.Forma.Core.Publishing.Publishers
Syntax
[Serializable]
public abstract class AbstractPublisher
Properties
ContentType
Publisher's content type.
Declaration
public PublisherContentType ContentType { get; set; }
Property Value
| Type | Description |
|---|---|
| PublisherContentType |
DisplayName
The end-point's name
Declaration
public abstract string DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| String |
Selected
Whether or not publisher is selected for use
Declaration
public bool Selected { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Methods
CanPublishAsync(BuildProfile, String, Boolean)
Check if the Publisher can publish runtime.
Declaration
public abstract Task<bool> CanPublishAsync(BuildProfile buildProfile, string buildFolder, bool showLogs = false)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildProfile | buildProfile | Build profile used to publish product |
| String | buildFolder | Path to folder containing runtime build |
| Boolean | showLogs | Whether or not errors should be printed to the Console |
Returns
| Type | Description |
|---|---|
| Task<Boolean> | Whether or not publisher can publish runtime |
CanPublishAsync(BuildProfile, Product, String, Boolean)
Check if the Publisher can publish product.
Declaration
public abstract Task<bool> CanPublishAsync(BuildProfile buildProfile, Product product, string aaFolder, bool showLogs = false)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildProfile | buildProfile | Build profile used to publish product |
| Product | product | Product to be published |
| String | aaFolder | Path to folder containing aa and catalog |
| Boolean | showLogs | Whether or not errors should be printed to the Console |
Returns
| Type | Description |
|---|---|
| Task<Boolean> | Whether or not publisher can publish product |
PublishProductAsync(BuildProfile, Product, String, String, Boolean)
Try to publish product using passed data.
Declaration
public abstract Task PublishProductAsync(BuildProfile buildProfile, Product product, string aaFolder, string address, bool showLogs = false)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildProfile | buildProfile | Build profile used to publish product |
| Product | product | Product to be published |
| String | aaFolder | Path to folder containing aa and catalog |
| String | address | Addressable address of the product |
| Boolean | showLogs | Whether or not errors should be printed to the Console |
Returns
| Type | Description |
|---|---|
| Task | Whether or not publish was successful |
PublishRuntimeAsync(BuildProfile, String, Boolean)
Try to publish build at path using passed data.
Declaration
public abstract Task PublishRuntimeAsync(BuildProfile buildProfile, string buildFolder, bool showLogs = false)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildProfile | buildProfile | Build profile used to publish product |
| String | buildFolder | Path to folder containing build content |
| Boolean | showLogs | Whether or not errors should be printed to the Console |
Returns
| Type | Description |
|---|---|
| Task | Whether or not publish was successful |