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