Пример #1
0
 public virtual void removeArtifact(ResourceDefinitionEntity notDeployedArtifact)
 {
     if (deployedArtifacts != null)
     {
         System.Collections.IList artifacts = deployedArtifacts[notDeployedArtifact.GetType()];
         if (artifacts != null)
         {
             artifacts.Remove(notDeployedArtifact);
             if (artifacts.Count == 0)
             {
                 deployedArtifacts.Remove(notDeployedArtifact.GetType());
             }
         }
     }
 }
Пример #2
0
        // Deployed artifacts manipulation //////////////////////////////////////////

        public virtual void addDeployedArtifact(ResourceDefinitionEntity deployedArtifact)
        {
            if (deployedArtifacts == null)
            {
                deployedArtifacts = new Dictionary <Type, System.Collections.IList>();
            }

            Type clazz = deployedArtifact.GetType();

            System.Collections.IList artifacts = deployedArtifacts[clazz];
            if (artifacts == null)
            {
                artifacts = new List <object>();
                deployedArtifacts[clazz] = artifacts;
            }

            artifacts.Add(deployedArtifact);
        }