GH_CodeBlocks

List<1>References
Represents a list of source code blocks in a GH_ScriptEditor window.

Methods

Add

#
public void Add(IEnumerable<string> lines, bool readonly)
lines (IEnumerable<string>)
readonly (bool)

Add

#
public void Add(string line, bool readonly)
line (string)
readonly (bool)

GetAllLines

#
public void GetAllLines(ref string[] lines, ref bool[] readonly)
Convert all blocks to a single array of lines and readonly flags.
lines (ref string[])
readonly (ref bool[])

GetMutableCodeBlock

#
public GH_CodeBlock GetMutableCodeBlock(int index)
Get all the lines that belong to the Nth mutable code block.
index (int)Index of mutable code block to retrieve.
An array of source code lines or null if there is no Nth block.

MergeConsecutiveBlocks

#
public int MergeConsecutiveBlocks()
Merge all consecutive blocks with identical readonly flags.
Number of blocks merged.

StringSplit

#
public static List<string> StringSplit(string delim, string stream)
String split utility class.
delim (string)
stream (string)