private void UpdateFunctions(IEnumerable<Function> updateFunctions)
 {
     //workspace.getArtifacts/functionArtifacts oder artefakte einzeln holen schneller??
     foreach (Function f in updateFunctions)
     {
         Cloud.Artifact a = workspace.getArtifactsWithProperty(Fields.DT, FunctionUtils.GetFunctionDT(f)).ElementAt(0);
         String functionName = FunctionUtils.GetFunctionName(f);
         if (!functionName.Equals(a.getPropertyValue(Fields.NAME)))
         {
             a.setPropertyValue(workspace, Fields.NAME, functionName);
             Debug.WriteLine("Update functionname");
         }
     }
 }
            private void UpdateConnections(IEnumerable<Cloud.Artifact> deletedConnections, IEnumerable<Function> selectedFunctions)
            {
                if (selectedFunctions == null) return;

                foreach (Cloud.Artifact a in deletedConnections)
                {
                    bool fOut = false;
                    bool fIn = false;
                    Cloud.Artifact outArtifact = (Cloud.Artifact)a.getPropertyValue(Fields.OUT);
                    String outPin = null;
                    if (outArtifact != null)
                    {
                        outPin = a.getPropertyValue(Fields.OUT_PIN).ToString();
                        fOut = selectedFunctions.Any<Function>(x => FunctionUtils.GetFunctionDT(x) == outArtifact.getPropertyValue(Fields.DT).ToString());
                    }

                    Cloud.Artifact inArtifact = (Cloud.Artifact)a.getPropertyValue(Fields.IN);
                    String inPin = null;
                    if (inArtifact != null)
                    {
                        fIn = selectedFunctions.Any<Function>(x => FunctionUtils.GetFunctionDT(x) == inArtifact.getPropertyValue(Fields.DT).ToString());
                        inPin = a.getPropertyValue(Fields.IN_PIN).ToString();
                    }

                    //selectedFunctions.Contains<Function>(x => x.getPropertyValue(Fields.DT).Equals(CommonUtils.GetFunctionDT((Function)c.StartSymbolReference)))


                    if (fOut)
                    {
                        UpdateArtifact(a, Fields.OUT, null);
                        UpdateArtifact(a, Fields.OUT_PIN, null);
                    }

                    if (fIn)
                    {
                        UpdateArtifact(a, Fields.IN, null);
                        UpdateArtifact(a, Fields.IN_PIN, null);
                    }

                }
            }