Пример #1
0
        protected string projectsMap(ProjectsMap.Project project, IPM pm)
        {
            if(pm.FinalEmptyIs(0, LevelType.Property, "name")) {
                return project.name;
            }

            if(pm.FinalEmptyIs(0, LevelType.Property, "path")) {
                return project.path;
            }

            if(pm.FinalEmptyIs(0, LevelType.Property, "type")) {
                return project.type;
            }

            if(pm.FinalEmptyIs(0, LevelType.Property, "guid")) {
                return project.guid;
            }

            throw new OperationNotFoundException("Failed projectsMap - '{0}' /'{1}'", pm.Levels[0].Data, pm.Levels[0].Type);
        }
Пример #2
0
        protected string projectsMap(ProjectsMap.Project project, IPM pm)
        {
            if(pm.FinalEmptyIs(LevelType.Property, "name")) {
                return project.name;
            }

            if(pm.FinalEmptyIs(LevelType.Property, "path")) {
                return project.path;
            }

            if(pm.FinalEmptyIs(LevelType.Property, "type")) {
                return project.type;
            }

            if(pm.FinalEmptyIs(LevelType.Property, "guid")) {
                return project.guid;
            }

            throw new IncorrectNodeException(pm);
        }