AvalonEdit
Rope<(Of <(<'T>)>)> Constructor (length, initializer)
NamespacesICSharpCode.AvalonEdit.UtilsRope<(Of <(<'T>)>)>Rope<(Of <(<'T>)>)>(Int32, Func<(Of <<'(Rope<(Of <<'(T>)>>)>)>>))
Creates a new rope that lazily initalizes its content.
Declaration Syntax
C#Visual BasicVisual C++
public Rope(
	int length,
	Func<Rope<T>> initializer
)
Public Sub New ( _
	length As Integer, _
	initializer As Func(Of Rope(Of T)) _
)
public:
Rope(
	int length, 
	Func<Rope<T>^>^ initializer
)
Parameters
length (Int32)
The length of the rope that will be lazily loaded.
initializer (Func<(Of <(<'Rope<(Of <(<'T>)>)>>)>)>)
The callback that provides the content for this rope. initializer will be called exactly once when the content of this rope is first requested. It must return a rope with the specified length. Because the initializer function is not called when a rope is cloned, and such clones may be used on another threads, it is possible for the initializer callback to occur on any thread.
Remarks
Any modifications inside the rope will also cause the content to be initialized. However, insertions at the beginning and the end, as well as inserting this rope into another or using the Concat(Rope<(Of <<'(T>)>>), Rope<(Of <<'(T>)>>)) method, allows constructions of larger ropes where parts are lazily loaded. However, even methods like Concat may sometimes cause the initializer function to be called, e.g. when two short ropes are concatenated.

Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: 5.0.0.4238