コード例 #1
0
ファイル: Spindle.cs プロジェクト: gnieuwhof/enigma
        // M4 (Kriegsmarine)
        public Spindle(ThinReflector thinReflector, ThinRotor thinRotor,
            Rotor rotor1, Rotor rotor2, Rotor rotor3
            )
            : this((ReflectorBase)thinReflector, rotor1, rotor2, rotor3)
        {
            if (thinRotor == null)
                throw new ArgumentNullException(nameof(thinRotor));

            this.thinRotor = thinRotor;
        }
コード例 #2
0
ファイル: Spindle.cs プロジェクト: gnieuwhof/enigma
        private Spindle(ReflectorBase reflector, Rotor rotor1, Rotor rotor2, Rotor rotor3)
        {
            if (reflector == null)
                throw new ArgumentNullException(nameof(reflector));
            if (rotor1 == null)
                throw new ArgumentNullException(nameof(rotor1));
            if (rotor2 == null)
                throw new ArgumentNullException(nameof(rotor2));
            if (rotor3 == null)
                throw new ArgumentNullException(nameof(rotor3));

            this.reflector = reflector;

            this.rotor1 = rotor1;
            this.rotor2 = rotor2;
            this.rotor3 = rotor3;
        }
コード例 #3
0
ファイル: Spindle.cs プロジェクト: gnieuwhof/enigma
 // Enigma I (Wehrmacht)
 public Spindle(Reflector reflector, Rotor rotor1, Rotor rotor2, Rotor rotor3)
     : this((ReflectorBase)reflector, rotor1, rotor2, rotor3)
 {
 }