コード例 #1
0
 public void Setup()
 {
     _byteFactory       = new ByteFactory(new Base10Converter());
     _and               = new And();
     _memoryGateFactory = new MemoryGateFactory(new NAnd(new Not(), _and));
     _byteMemoryGate    = new ByteMemoryGate(_memoryGateFactory, _byteFactory);
     _byteEnabler       = new ByteEnabler(_and, _byteFactory);
     _sut               = new ByteRegister(_byteMemoryGate, _byteEnabler, _byteFactory, wire => {});
 }
コード例 #2
0
        public static ByteRegister CreateRegister(bool set = true, bool enable = true)
        {
            var byteFactory       = new ByteFactory(new Base10Converter());
            var memoryGateFactory = new MemoryGateFactory(new NAnd(new Not(), new And()));
            var and = new And();

            return(new ByteRegister(new ByteMemoryGate(memoryGateFactory, byteFactory),
                                    new ByteEnabler(and, byteFactory), byteFactory, wire => {})
            {
                Set = set, Enable = enable
            });
        }
コード例 #3
0
 public void Setup()
 {
     _byteFactory       = new ByteFactory(new Base10Converter());
     _and               = new And();
     _memoryGateFactory = new MemoryGateFactory(new NAnd(new Not(), _and));
 }