コード例 #1
0
 public ObjectResult ImpactedRelatoinships(ImpactedServiceKeyWeb postData)
 {
     return(WebFunction.Execute <ImpactedServiceKeyWeb, ServiceRelationshipWeb[]>(this, postData, (si) =>
     {
         var key = new ServiceKey(si.Key);
         var rel = ServiceRelationships.GetImpactedRelationhips(key, si.ChangedAttributes).ToList().ToArray();
         return new WebResult <ServiceRelationshipWeb[]>(rel.Select(i => i.ToWeb()).ToArray());
     }));
 }
コード例 #2
0
        public void ServiceRelationship_Get()
        {
            Startup.LoadSettings();

            var sd = ServiceRelationships.GetServiceRelationships(217, 0);

            Assert.IsNotNull(sd);
            Assert.AreEqual <string>(sd[0].Name, "IPVPN ENDPOINT CPE");
        }
コード例 #3
0
        public ObjectResult Relationships(ServiceKeyWeb postData)
        {
            return(WebFunction.Execute <ServiceKeyWeb, ServiceRelationshipWeb[]>(this, postData, (sv) =>
            {
                var key = new ServiceKey(sv);
                var config = ServiceRelationships.Get(key);

                var svcRel = config.Select(def => def.GetDefinition(key)).Where(pd => pd != null).ToList();
                var answer = svcRel.Select(rel => rel.ToWeb()).ToArray();

                return new WebResult <ServiceRelationshipWeb[]>(answer);
            }));
        }