SIL.FieldWorks.Common.Controls.ObjectValuePartGenerator.Generate C# (CSharp) Method

Generate() public method

Generate the nodes that the constructor arguments indicate.
public Generate ( ) : System.Xml.XmlNode[]
return System.Xml.XmlNode[]
		public override XmlNode[] Generate()
		{
			List<int> ids = FieldIds;
			var result = new XmlNode[m_collectionToGeneratePartsFrom.Count];
			int iresult = 0;
			int fieldId = ids[iresult];
			// Enhance: generalize this
			foreach (var fsFeatDefn in m_sortedCollection)
			{
				XmlNode output = m_source.Clone();
				result[iresult] = output;
				string fieldName = fsFeatDefn.Abbreviation.BestAnalysisAlternative.Text;
				string className = fsFeatDefn.ClassName;
				string labelName = fieldName;
				// generate parts for any given custom layout
				// TODO: generalize the field ids
				GeneratePartsFromLayouts(m_rootClassId, fieldName, PhPhonemeTags.kflidFeatures, ref output);
				ReplaceParamsInAttributes(output, labelName, fieldName, FsFeatDefnTags.kflidName, className);
				iresult++;
			}
			return result;
		}
	}
ObjectValuePartGenerator