Symphony Framework
Symphony CollectionWithMethods v3 2
Symphony Templates > Symphony CollectionWithMethods v3 2
Template file name Symphony_Collection_WithMethods_v3_2.tpl

The Symphony_CollectionWithMethods (version 3.2) generates a collection class and populates the collection with the Selection List entries defined against each field in your Synergy Repository.  In addition it provides a method (SelectMethod()) that returns the complete collection.

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.  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
 Example
;;****************************************************************************
;;
;; 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

endnamespace


See Also

Reference