Adds a menu item

Namespace: RightEdge.Common
Assembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)

Syntax

C#
void AddMenuItem(
	string name,
	Func<IEnumerable<Symbol>> symbolFunc
)
Visual Basic
Sub AddMenuItem ( 
	name As String,
	symbolFunc As Func(Of IEnumerable(Of Symbol))
)
Visual C++
void AddMenuItem(
	String^ name, 
	Func<IEnumerable<Symbol^>^>^ symbolFunc
)
F#
abstract AddMenuItem : 
        name : string * 
        symbolFunc : Func<IEnumerable<Symbol>> -> unit 

Parameters

name
Type: System..::..String
Name of the menu item
symbolFunc
Type: System..::..Func<(Of <(<'IEnumerable<(Of <(<'Symbol>)>)>>)>)>
Delegate to be called when the menu item is selected

Remarks

The symbolFunc delegate should return a list of symbols to add to the watchlist. It should either return quickly or display it's own UI for progress or user input. If it may take some time to retrieve the symbol list but there is no user input needed, use the AddAsyncMenuItem(String, Func<(Of <<'(Task<(Of <<'(IEnumerable<(Of <<'(Symbol>)>>)>)>>)>)>>)) method instead.

See Also