Show / Hide Table of Contents

Class MetalDocumentAdapter

An adapter for an IDocument which allows it to be used as IProvidesMacros and IGetsNamedTalesValue.

Inheritance
System.Object
MetalDocumentAdapter
Implements
IProvidesMacros
IGetsNamedTalesValue
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Metal
Assembly: ZptSharp.dll
Syntax
public class MetalDocumentAdapter : IProvidesMacros, IGetsNamedTalesValue

Constructors

| Improve this Doc View Source

MetalDocumentAdapter(IDocument, ISearchesForAttributes, IGetsMetalAttributeSpecs)

Initializes a new instance of the MetalDocumentAdapter class.

Declaration
public MetalDocumentAdapter(IDocument document, ISearchesForAttributes attributeSearcher, IGetsMetalAttributeSpecs specProvider)
Parameters
Type Name Description
IDocument document

The document to be wrapped.

ISearchesForAttributes attributeSearcher

A service which will search for attributes.

IGetsMetalAttributeSpecs specProvider

A METAL attribute spec provider.

Properties

| Improve this Doc View Source

Document

Gets the document for the current instance.

Declaration
public IDocument Document { get; }
Property Value
Type Description
IDocument
| Improve this Doc View Source

SourceName

Gets the name of the source info for this template.

Declaration
public string SourceName { get; }
Property Value
Type Description
System.String

The name of the source.

Methods

| Improve this Doc View Source

GetMacros()

Gets a collection of all of the macros

Declaration
public IDictionary<string, MetalMacro> GetMacros()
Returns
Type Description
System.Collections.Generic.IDictionary<System.String, MetalMacro>

The macros.

| Improve this Doc View Source

TryGetValueAsync(String, CancellationToken)

Attempts to get a value for a named reference, relative to the current instance.

Declaration
public Task<GetValueResult> TryGetValueAsync(string name, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String name

The name of the value to retrieve.

System.Threading.CancellationToken cancellationToken

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<GetValueResult>

An object indicating whether a value was successfully retrieved or not, along with the retrieved value (if applicable).

Implements

IProvidesMacros
IGetsNamedTalesValue
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX