Dsl/GeneratedCode/ToolboxHelper.cs
/// <summary>
/// Given a toolbox item "unique ID" returns the the toolbox item using cached dictionary
/// </summary>
/// <param name="itemId">The unique ToolboxItem to retrieve</param>
Given a toolbox item "unique ID" returns the the toolbox item using cached dictionary
Given a toolbox item " unique ID " returns the the toolbox item using cached dictionary
private DslDesign::ModelingToolboxItem GetToolboxItem(string itemId)
		{
			DslDesign::ModelingToolboxItem item = null;
			if (!this.toolboxItemCache.TryGetValue(itemId, out item))
			{
				DslModeling::Store store = this.ToolboxStore;
				using (DslModeling::Transaction t = store.TransactionManager.BeginTransaction("CreateToolboxItems"))
				{
					this.toolboxItemCache[itemId] = item = this.GetToolboxItem(itemId, store);
				}
			}
			return item;
		}
private DslDesign :: ModelingToolboxItem GetToolboxItem ( string itemId ) { DslDesign :: ModelingToolboxItem item = null ; if ( ! this . toolboxItemCache . TryGetValue ( itemId , out item ) ) { DslModeling :: Store store = this . ToolboxStore ; using ( DslModeling :: Transaction t = store . TransactionManager . BeginTransaction ( " " ) ) { this . toolboxItemCache [ itemId ] = item = this . GetToolboxItem ( itemId , store ) ; } } return item ; }
Given a toolbox item "unique ID" returns the the toolbox item using cached dictionary
Given a toolbox item " unique ID " returns the the toolbox item using cached dictionary
// Open transaction so we can create model elements corresponding to toolbox items. // Retrieve the specified ToolboxItem from the DSL
itemId
string
The unique ToolboxItem to retrieve
The unique ToolboxItem to retrieve