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