예제 #1
0
        public void TheCallingAssembly()
        {
            var callingAssembly = CallingAssembly.Find();

            if (callingAssembly != null)
            {
                Assembly(callingAssembly);
            }
            else
            {
                throw new InvalidOperationException("Could not determine the calling assembly, you may need to explicitly call IAssemblyScanner.Assembly()");
            }
        }
예제 #2
0
        public void TheCallingAssembly()
        {
            if (_parent.GetType().Assembly != typeof(ServiceRegistry).Assembly)
            {
                Assembly(_parent.GetType().Assembly);
                return;
            }

            var callingAssembly = CallingAssembly.Find();

            if (callingAssembly != null)
            {
                Assembly(callingAssembly);
            }
            else
            {
                throw new InvalidOperationException("Could not determine the calling assembly, you may need to explicitly call IAssemblyScanner.Assembly()");
            }
        }
예제 #3
0
 public static Assembly Calling()
 {
     return(CallingAssembly.Find());
 }
 public void use_current_assembly()
 {
     CallingAssembly.Find()
     .ShouldBe(GetType().Assembly);
 }