コード例 #1
0
        public void SetUp()
        {
            _assemblyContextPoolMock = MockRepository.GenerateStrictMock <IAssemblyContextPool>();
            _assemblyContext         = CreateAssemblyContext();

            _decorator = new ThreadLocalAssemblyContextPoolDecorator(_assemblyContextPoolMock);
        }
コード例 #2
0
        public void SetUp()
        {
            _typeAssemblerMock       = MockRepository.GenerateStrictMock <ITypeAssembler>();
            _assemblyContextPoolMock = MockRepository.GenerateStrictMock <IAssemblyContextPool>();

            _cache           = new TypeCache(_typeAssemblerMock, _assemblyContextPoolMock);
            _additionalTypes = (IDictionary <object, Lazy <Type> >)PrivateInvoke.GetNonPublicField(_cache, "_additionalTypes");
        }
コード例 #3
0
        public void SetUp()
        {
            _typeCacheMock       = MockRepository.GenerateStrictMock <ITypeCache>();
            _typeAssemblerMock   = MockRepository.GenerateStrictMock <ITypeAssembler>();
            _assemblyContextPool = MockRepository.GenerateStrictMock <IAssemblyContextPool>();

            _manager = new CodeManager(_typeCacheMock, _typeAssemblerMock, _assemblyContextPool);
        }
コード例 #4
0
        public CodeManager(ITypeCache typeCache, ITypeAssembler typeAssembler, IAssemblyContextPool assemblyContextPool)
        {
            ArgumentUtility.CheckNotNull("assemblyContextPool", assemblyContextPool);
            ArgumentUtility.CheckNotNull("typeAssembler", typeAssembler);
            ArgumentUtility.CheckNotNull("typeCache", typeCache);

            _typeCache           = typeCache;
            _typeAssembler       = typeAssembler;
            _assemblyContextPool = assemblyContextPool;
        }
コード例 #5
0
ファイル: TypeCache.cs プロジェクト: re-motion/TypePipe
        public TypeCache(ITypeAssembler typeAssembler, IAssemblyContextPool assemblyContextPool)
        {
            ArgumentUtility.CheckNotNull("typeAssembler", typeAssembler);
            ArgumentUtility.CheckNotNull("assemblyContextPool", assemblyContextPool);

            _typeAssembler       = typeAssembler;
            _assemblyContextPool = assemblyContextPool;

            _createAssembledTypeFunc  = CreateAssembledType;
            _createAdditionalTypeFunc = CreateAdditionalType;
        }
コード例 #6
0
        protected override ICodeManager NewCodeManager(ITypeCache typeCache, ITypeAssembler typeAssembler, IAssemblyContextPool assemblyContextPool)
        {
            var codeManager = base.NewCodeManager(typeCache, typeAssembler, assemblyContextPool);

            AssemblyTrackingCodeManager = new AssemblyTrackingCodeManager(codeManager);

            return(AssemblyTrackingCodeManager);
        }
コード例 #7
0
 public ThreadLocalAssemblyContextPoolDecorator(IAssemblyContextPool assemblyContextPool)
 {
     _assemblyContextPool = assemblyContextPool;
 }
コード例 #8
0
 protected virtual ITypeCache NewTypeCache(ITypeAssembler typeAssembler, IAssemblyContextPool assemblyContextPool)
 {
     return(new TypeCache(typeAssembler, assemblyContextPool));
 }
コード例 #9
0
 protected virtual ICodeManager NewCodeManager(ITypeCache typeCache, ITypeAssembler typeAssembler, IAssemblyContextPool assemblyContextPool)
 {
     return(new CodeManager(typeCache, typeAssembler, assemblyContextPool));
 }