Ejemplo n.º 1
0
        internal override void CloseInjectFrame(InjectFrame frame)
        {
            if (frame.IsNull)
            {
                return;
            }

            if (frame.layer != this)
            {
                throw new InjectFrameCloseException(
                          $"Cannot close inject frame as it does not belong to the current dependency layer " +
                          $"(current layer = '{this}', {nameof(frame)}.{nameof(InjectFrame.layer)} = '{frame.layer}')"
                          );
            }

            if (frame.parentStackLevel + 1 != currentStackLevel)
            {
                throw new InjectFrameCloseException(
                          $"Cannot close inject frame with parent stack level '{frame.parentStackLevel}' " +
                          $"as it is not exactly one less than the current stack level '{currentStackLevel}'.",
                          DisposeExceptionsManager.WrapLastExceptionThrown()
                          );
            }

            uninjectDependency_internal(frame.type, frame.parentStackLevel);
        }
Ejemplo n.º 2
0
 internal override void CloseInjectFrame(InjectFrame frame)
 {
     throw new NotImplementedException();
 }