Show / Hide Table of Contents

Class InstrumentPublisherBase

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

Inheritance
System.Object
InstrumentPublisherBase
Namespace: Algenta.Colectica.ViewModel
Assembly: Algenta.Colectica.ViewModel.dll
Syntax
public abstract class InstrumentPublisherBase : object, 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
System.String
Implements
IInstrumentPublisher.DefaultExtension

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
System.Boolean

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
System.Boolean
Implements
IInstrumentPublisher.IsInteractive

Name

Gets the name of the instrument publisher.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String
Implements
IInstrumentPublisher.Name

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
System.Int32
Implements
IInstrumentPublisher.Weight

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<System.String> messages

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

Returns
Type Description
System.Boolean

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

Implements
IInstrumentPublisher.CanPublish(Instrument, List<String>)

CanPublishBasedOnContents(Instrument, List<String>, 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<System.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
System.Boolean

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
System.Boolean

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.

System.String outputPath

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

Implements
IInstrumentPublisher.Publish(Node, Instrument, String)

Extension Methods

Extensions.Yield<T>(T)
Back to top Copyright © 2009-2018 Colectica