Exemple #1
0
        public SymbolRepository(CSET_Context context)
        {
            // This gets all Component Symbols or NodeTypes/Service Types from the database
            foreach (COMPONENT_SYMBOLS symbolItemData in context.COMPONENT_SYMBOLS.Include(x => x.Symbol_Group_).OrderBy(x => x.Symbol_Name))
            {
                // Populate the DataTemplate files (for the vectors) into a Dictionary from the Component Symbols table.
                // TODO: Handle possible null for file name
                SymbolComponentData symbolComponentData = new SymbolComponentData(symbolItemData);

                SymbolComponentItem componentItem = new SymbolComponentItem(symbolComponentData);
                this.dictionarySymbolComponentData[symbolComponentData.Component_Symbol_Id] = symbolComponentData;


                this.NodeTypes.Add(symbolComponentData);
                if (symbolComponentData.IsService)
                {
                    this.ServiceTypes.Add(symbolComponentData);
                }
            }
        }
 public SymbolComponentItem(SymbolComponentData symbolData)
 {
     this.ComponentSymbolData = symbolData;
 }