GlobalServer

References
public sealed class GlobalServer
Maintains a collection of global data sources within a document.

Constructors

GlobalServer

#
public GlobalServer(Document document)
Create a new global object repository.
document (Document)Document that owns this repository.

Properties

Document

#
public Document Document { get; }
Gets the document associated with this global server.

Shouts

#
public IEnumerable<Shout> Shouts { get; }
Iterate over all Shout objects in the document associated with this server. This property duplicates the internal collection so it can be used in a thread-safe way. That is to say, changes made to the collection *while iterating* will not be reflected in this enumerable.

Methods

CreateResolver

#
public Resolver CreateResolver(IDocumentObject caller, Solution solution, CallStack stack)
Create an undeclared resolver for expressions based on globals in the current document and parent documents.
caller (IDocumentObject)
solution (Solution)
stack (CallStack)

FindReferences

#
public void FindReferences(Shout shout, out IDocumentObject[] listenObjects, out IDocumentObject[] otherObjects)
Find all references to a specific shout object.
shout (Shout)Shout to search for.
listenObjects (out IDocumentObject[])All listen objects in this file which depend on this shout.
otherObjects (out IDocumentObject[])All other objects, this is probably just objects with expressions, but it could also be scripts or plugin objects.

FindShouts

#
public Shout[] FindShouts(string search)
Gets all Shout objects associated with the given search. There may be zero or more shouts which match the name, either because they simply have identical names, or because the search contains wildcards.
search (string)Search term.
Array of matching shout objects.

IsMatch

#
public static bool IsMatch(string search, Shout shout)
Test whether a Shout matches a search term. The search term may just be a string which will be matched against the shout UserName. The search term may contain * and ? wildcards which will be matched against the shout UserName. The search term may be a Guid in string form which will be matched against the shout InstanceId.
search (string)
shout (Shout)

Resolve

#
public ITree Resolve(string search, IDocumentObject caller, Solution solution, CallStack callstack)
Attempt to resolve the actual data stored in a global parameter. If the parameter is unsolved, a solution will be attempted. This method has potentially high overhead, but results are cached during solutions. If no match can be found in this document, the parent document (if any) will be searched, and so on up the document parent chain.
search (string)Search string for global data.
caller (IDocumentObject)Object which requests this search.
solution (Solution)Solution within which this search happens.
callstack (CallStack)Callstack.
Volatile data inside global parameter or null if parameter could not be found.