Example #1
0
        public IEnumerable <Node> GetAll()
        {
            var nodes         = _nodeRepository.GetAll().ToList();
            var edgeRelations = _relationRepository.GetAllEdgeRelations().ToList();

            IEnumerable <Node> gluedNodes = GlueLogic.GlueNodes(nodes, edgeRelations);

            return(gluedNodes);
        }
        private void Init()
        {
            _relationRepository = EditorContainer.Container.GetInstance <INodeRelationRepository>();

            _actions =
                _relationRepository
                .GetAllEdgeRelations()
                .Select(LabelService.GetLabel)
                .ToDictionary <string, string, Action <IDialogContext> >(
                    str => str,
                    str => ctx => RelationSelected(str, ctx));

            _actions.Add("Add new relation", AddNewRelationOptionSelected);

            _relationActions = new Dictionary <string, Action <IDialogContext> >()
            {
                { "Delete this relation!", DeleteRelation },
                { "Go back!", async ctx => await StartAsync(ctx) }
            };
        }