Esempio n. 1
0
 void AddResourceAsDynamicServiceObject(List <DynamicServiceObjectBase> result, IResource resource)
 {
     if (resource.ResourceType == "ReservedService")
     {
         if (resource is ManagementServiceResource managementResource)
         {
             result.Add(managementResource.Service);
         }
     }
     else
     {
         if (!FrequentlyUsedServices.TryGetValue(resource.ResourceName, out List <DynamicServiceObjectBase> objects))
         {
             objects = GenerateObjectGraph(resource);
         }
         else
         {
             Dev2Logger.Debug($"{resource.ResourceName} -> Resource Catalog Cache HIT", GlobalConstants.WarewolfDebug);
         }
         if (objects != null)
         {
             result.AddRange(objects);
         }
     }
 }
 private void AddResourceAsDynamicServiceObject(List <DynamicServiceObjectBase> result, IResource resource)
 {
     if (resource.ResourceType == "ReservedService")
     {
         var managementResource = resource as ManagementServiceResource;
         if (managementResource != null)
         {
             result.Add(managementResource.Service);
         }
     }
     else
     {
         List <DynamicServiceObjectBase> objects;
         if (!FrequentlyUsedServices.TryGetValue(resource.ResourceName, out objects))
         {
             objects = GenerateObjectGraph(resource);
         }
         else
         {
             Dev2Logger.Debug($"{resource.ResourceName} -> Resource Catalog Cache HIT");
         }
         if (objects != null)
         {
             result.AddRange(objects);
         }
     }
 }