Symphony Framework
Symphony CollectionFromFileWithMethods v3 2
Symphony Templates > Symphony CollectionFromFileWithMethods v3 2
Template file name Symphony_CollectionFromFileWithMethods_v3_2.tpl


The Symphony_CollectionFromFileWithMethods (version 3.2) generates a collection class and the associated code to populate the collection from a data file.  The created class is a populated collection of Symphony.Conductor.Content.SelectionItem.  Each collection item contains a ItemValue (or ItemStringValue for alpha based collections) and Description.  In addition it provides a method (SelectMethod()) that returns the complete collection.

The ItemValue/ItemStringValue property can be data-bound to the SelectedValuePath of a ComboBox/drop-down list.  The Description is the element displayed (DisplayMemeberPath for a WPF ComboBox) within the visible list.

It is recommended that your generated code from the Symphony_CollectionWithMethods template is created into a project sub-folder called Content.
 CodeGen Template Tokens
Token Comments
NAMESPACE Specifies the namespace within which to create the class.
 Symphony Tokens
There are no Symphony Tokens required for this template.

 CodeGen Command Examples
Create standard collection
codegen e -r -s PART -t Symphony_CollectionWithMethods_v3_2 -o %ROOT%ControlLibrary\Content -n ControlLibrary.Content
;; WARNING: This code was code generated. Any changes that you
;;          make to this code will be overwritten if the code is regenerated!
;; Template author:    Richard C. Morris : RCP Consultants.
;; Template Name:    Symphony Framework : SYMPHONY_COLLECTIONWITHMETHODS_V3_2.tpl

import System
import System.Collections.Generic
import System.Text

import Symphony.Conductor.Content

namespace ControlLibrary.Content


See Also