Exemple #1
0
 public static global::System.Collections.ObjectModel.ReadOnlyCollection <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode> GetLinks(global::SPbSU.RobotsLanguage.Compound source, global::SPbSU.RobotsLanguage.SubprogramNode target)
 {
     global::System.Collections.Generic.List <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode>  outLinks = new global::System.Collections.Generic.List <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode>();
     global::System.Collections.Generic.IList <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode> links    = DslModeling::DomainRoleInfo.GetElementLinks <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode>(source, global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode.CompoundDomainRoleId);
     foreach (global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode link in links)
     {
         if (target.Equals(link.SubprogramNode))
         {
             outLinks.Add(link);
         }
     }
     return(outLinks.AsReadOnly());
 }
Exemple #2
0
 public static global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode GetLink(global::SPbSU.RobotsLanguage.Compound source, global::SPbSU.RobotsLanguage.SubprogramNode target)
 {
     global::System.Collections.Generic.IList <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode> links = DslModeling::DomainRoleInfo.GetElementLinks <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode>(source, global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode.CompoundDomainRoleId);
     foreach (global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode link in links)
     {
         if (target.Equals(link.SubprogramNode))
         {
             return(link);
         }
     }
     return(null);
 }
Exemple #3
0
 public static global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode GetLinkToCompound(global::SPbSU.RobotsLanguage.SubprogramNode subprogramNodeInstance)
 {
     global::System.Collections.Generic.IList <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode> links = DslModeling::DomainRoleInfo.GetElementLinks <global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode>(subprogramNodeInstance, global::SPbSU.RobotsLanguage.CompoundHasSubprogramNode.SubprogramNodeDomainRoleId);
     global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of SubprogramNode not obeyed.");
     if (links.Count == 0)
     {
         return(null);
     }
     else
     {
         return(links[0]);
     }
 }