Exemple #1
0
        private void ExitResolutionContext(Burden burden, bool trackContext)
        {
            handlerStack.Pop();

            if (trackContext)
            {
                resolutionStack.Pop();
            }
            if (burden == null)
            {
                return;
            }
            if (burden.Instance == null)
            {
                return;
            }
            if (burden.RequiresPolicyRelease == false)
            {
                return;
            }
            if (resolutionStack.Count != 0)
            {
                var parent = resolutionStack.Peek().Burden;
                if (parent == null)
                {
                    return;
                }
                parent.AddChild(burden);
            }
        }
Exemple #2
0
 public Burden CreateBurden(bool trackedExternally)
 {
     // NOTE: not sure we should allow crreating burden again, when it was already created...
     // this is currently employed by pooled lifestyle
     burden = new Burden(handler, requiresDecommission, trackedExternally);
     return(burden);
 }
Exemple #3
0
        public void AddChild(Burden child)
        {
            if (dependencies == null)
            {
                //dependencies = new List<Burden>(Model.Dependents.Length);
            }
            dependencies.Add(child);

            if (child.RequiresDecommission)
            {
                decommission = Decommission.Yes;
            }
        }
Exemple #4
0
        public void AddChild(Burden child)
        {
            if (dependencies == null)
            {
                //dependencies = new List<Burden>(Model.Dependents.Length);
            }
            dependencies.Add(child);

            if (child.RequiresDecommission)
            {
                decommission = Decommission.Yes;
            }
        }
Exemple #5
0
 public void AttachBurden(Burden burden)
 {
     this.burden = burden;
 }
Exemple #6
0
 public Burden CreateBurden(bool trackedExternally)
 {
     // NOTE: not sure we should allow crreating burden again, when it was already created...
     // this is currently employed by pooled lifestyle
     burden = new Burden(handler, requiresDecommission, trackedExternally);
     return burden;
 }
Exemple #7
0
 public void AttachBurden(Burden burden)
 {
     this.burden = burden;
 }
Exemple #8
0
        private void ExitResolutionContext(Burden burden, bool trackContext)
        {
            handlerStack.Pop();

            if (trackContext)
            {
                resolutionStack.Pop();
            }
            if (burden == null)
            {
                return;
            }
            if (burden.Instance == null)
            {
                return;
            }
            if (burden.RequiresPolicyRelease == false)
            {
                return;
            }
            if (resolutionStack.Count != 0)
            {
                var parent = resolutionStack.Peek().Burden;
                if (parent == null)
                {
                    return;
                }
                parent.AddChild(burden);
            }
        }
Exemple #9
0
 public void Track(object instance, Burden burden)
 {
 }