Show / Hide Table of Contents

Class InstrumentPublisherBase

Provides a base class from which instrument publisher addins can be derived.

Inheritance
object
InstrumentPublisherBase
Implements
IInstrumentPublisher
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Algenta.Colectica.ViewModel
Assembly: Algenta.Colectica.ViewModel.dll
Syntax
public abstract class InstrumentPublisherBase : IInstrumentPublisher

Properties

DefaultExtension

Gets the default file extension used when prompting for a file name to create.

Declaration
public string DefaultExtension { get; set; }
Property Value
Type Description
string

HasOptionsUserInterface

Indicates whether the publisher provides its own user interface that allows the user to configure options before publishing.

Declaration
public bool HasOptionsUserInterface { get; set; }
Property Value
Type Description
bool

IsInteractive

Gets a value indicating whether the publisher provides its own user interface. If false, the user will be prompted with a File Save dialog. If true, the outputPath parameter of the Publish command will be empty.

Declaration
public bool IsInteractive { get; set; }
Property Value
Type Description
bool

Name

Gets the name of the instrument publisher.

Declaration
public string Name { get; set; }
Property Value
Type Description
string

Weight

Gets the order in which this Addin should be displayed. Lower values are displayed higher or further to the left.

Declaration
public int Weight { get; set; }
Property Value
Type Description
int

Methods

CanPublish(Instrument, List<string>)

Determines whether the provided instrument can be published by this addin.

Declaration
public abstract bool CanPublish(Instrument instrument, List<string> messages)
Parameters
Type Name Description
Instrument instrument

The instrument to be published.

List<string> messages

If the instrument cannot be published, a list of messages indicating the reason.

Returns
Type Description
bool

Returns true if the instrument can be published; otherwise false.

CanPublishBasedOnContents(Instrument, List<string>, params Guid[])

Determines whether this instance can publish the instrument, based on contents of the instrument.

Declaration
protected bool CanPublishBasedOnContents(Instrument instrument, List<string> messages, params Guid[] unsupportedTypes)
Parameters
Type Name Description
Instrument instrument

The instrument.

List<string> messages

The messages indicating why the instrument cannot be published.

Guid[] unsupportedTypes

The item types that the instrument does not support.

Returns
Type Description
bool

PromptUserForOptions()

Called to present a user interface that allows the user to configure some options before publishing.

Declaration
public virtual bool PromptUserForOptions()
Returns
Type Description
bool

Publish(Node, Instrument, string)

Publishes an instrument to the specified location.

Declaration
public abstract void Publish(Node node, Instrument instrument, string outputPath)
Parameters
Type Name Description
Node node

The node representing the instrument.

Instrument instrument

The instrument to publish.

string outputPath

The location to which the instrument should be published. If the IsInteractive property is true, this will be empty.

Implements

IInstrumentPublisher
In this article
Back to top Generated by DocFX