public static bool execute(KevoreeCoreBean originCore, IContainerNodeMarshalled rootNode, AdaptationModel adaptionModel, NodeType nodeInstance, Func<bool> afterUpdateFunc, Func<bool> preRollBack, Func<bool> postRollback)
        {
            var processedActions = new HashSet<AdaptationPrimitive>();
            bool success = true;
            foreach (AdaptationPrimitive action in adaptionModel.ToArray())
            {
                processedActions.Add(action);
                var resultAction = processAction(action, nodeInstance);
                if (!resultAction)
                {
                    success = false;
                    break;
                }
            }

            if (!success)
            {
                originCore.getLogger().Error("Adaptation failed");
                foreach (var act in processedActions.Reverse())
                {
                    processUndoAction(act, nodeInstance);
                }
            }
            else
            {
                originCore.getLogger().Debug("Adaptation succeeded");
            }
            return success;
        }
        public void testSerialization()
        {
            var obj = new KevoreeCoreBean();

            var a = Path.GetTempFileName();
            IFormatter formatter = new BinaryFormatter();
            Stream stream = new FileStream(a,
                                     FileMode.Create,
                                     FileAccess.Write, FileShare.None);
            formatter.Serialize(stream, obj);
            stream.Close();
        }
        public KevoreeListeners(Org.Kevoree.Core.KevoreeCoreBean kevoreeCoreBean)
        {
            // TODO: Complete member initialization
            this.kevoreeCoreBean = kevoreeCoreBean;

            new Thread(new ThreadStart(() =>
            {
                while (!schedulerStop)
                {
                    var value = scheduler.Take();
                    Task.Run(value);
                }
            })).Start();

            new Thread(new ThreadStart(() =>
            {
                while (!schedulerAsyncStop)
                {
                    var value = schedulerAsync.Take();
                    Task.Run(value);
                }
            })).Start();
        }
 public KevoreeSeqDeployPhase(KevoreeCoreBean originCore)
 {
     // TODO: Complete member initialization
     this.originCore = originCore;
 }