示例#1
0
 public static global::Company.DSLSample.ExampleElementReferencesTargets GetLink(global::Company.DSLSample.ExampleElement source, global::Company.DSLSample.ExampleElement target)
 {
     global::System.Collections.Generic.IList <global::Company.DSLSample.ExampleElementReferencesTargets> links = DslModeling::DomainRoleInfo.GetElementLinks <global::Company.DSLSample.ExampleElementReferencesTargets>(source, global::Company.DSLSample.ExampleElementReferencesTargets.SourceDomainRoleId);
     foreach (global::Company.DSLSample.ExampleElementReferencesTargets link in links)
     {
         if (target.Equals(link.Target))
         {
             return(link);
         }
     }
     return(null);
 }
示例#2
0
 public static global::System.Collections.ObjectModel.ReadOnlyCollection <global::Company.DSLSample.ExampleElementReferencesTargets> GetLinks(global::Company.DSLSample.ExampleElement source, global::Company.DSLSample.ExampleElement target)
 {
     global::System.Collections.Generic.List <global::Company.DSLSample.ExampleElementReferencesTargets>  outLinks = new global::System.Collections.Generic.List <global::Company.DSLSample.ExampleElementReferencesTargets>();
     global::System.Collections.Generic.IList <global::Company.DSLSample.ExampleElementReferencesTargets> links    = DslModeling::DomainRoleInfo.GetElementLinks <global::Company.DSLSample.ExampleElementReferencesTargets>(source, global::Company.DSLSample.ExampleElementReferencesTargets.SourceDomainRoleId);
     foreach (global::Company.DSLSample.ExampleElementReferencesTargets link in links)
     {
         if (target.Equals(link.Target))
         {
             outLinks.Add(link);
         }
     }
     return(outLinks.AsReadOnly());
 }