예제 #1
0
 private void addCommonModelReplacersTo(IKeywordReplacerCollection keywordReplacer, IContainer rootContainer)
 {
     //Replace the predefined keywords
     keywordReplacer.AddReplacement(new TopContainerPathReplacer(rootContainer.Name, rootContainer.GetChildren <IContainer>().AllNames()));
     keywordReplacer.AddReplacement(
         new TopContainerPathReplacer(rootContainer.Name, new[] { ObjectPathKeywords.MOLECULE, Constants.NEIGHBORHOODS }));
 }
예제 #2
0
 private void addCommonNeighborhoodReplacersTo(IKeywordReplacerCollection keywordReplacer, INeighborhood neighborhood)
 {
     if (neighborhood == null)
     {
         return;
     }
     keywordReplacer.AddReplacement(new KeywordWithPathReplacer(ObjectPathKeywords.FIRST_NEIGHBOR, _objectPathFactory.CreateAbsoluteObjectPath(neighborhood.FirstNeighbor)));
     keywordReplacer.AddReplacement(new KeywordWithPathReplacer(ObjectPathKeywords.SECOND_NEIGHBOR, _objectPathFactory.CreateAbsoluteObjectPath(neighborhood.SecondNeighbor)));
     keywordReplacer.AddReplacement(new KeywordWithPathReplacer(ObjectPathKeywords.NEIGHBORHOOD, _objectPathFactory.CreateAbsoluteObjectPath(neighborhood)));
     //should be placed after the KeywordWithPathReplacer so that NEIGHBORHOOD is only replaced if not found yet
     keywordReplacer.AddReplacement(new SimpleKeywordReplacer(ObjectPathKeywords.NEIGHBORHOOD, neighborhood.Name));
 }
예제 #3
0
 private void addMoleculeReplacersTo(IKeywordReplacerCollection keywordReplacer, string moleculeName)
 {
     if (string.IsNullOrEmpty(moleculeName))
     {
         return;
     }
     keywordReplacer.AddReplacement(new SimpleKeywordReplacer(ObjectPathKeywords.MOLECULE, moleculeName));
 }