Example #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);
            }
        }
Example #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);
 }
Example #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;
            }
        }
Example #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;
            }
        }
Example #5
0
 public void AttachBurden(Burden burden)
 {
     this.burden = burden;
 }
Example #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;
 }
Example #7
0
 public void AttachBurden(Burden burden)
 {
     this.burden = burden;
 }
Example #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);
            }
        }
Example #9
0
 public void Track(object instance, Burden burden)
 {
 }