コード例 #1
0
        /// <summary>
        /// Constructs a new <see cref="State"/>.
        /// </summary>
        /// <param name="server">The <see cref="IConsensusServerStateApi"/> to which this <see cref="State"/> belongs</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="server"/> is null.</exception>
        protected State(IConsensusServerStateApi server)
        {
            // validate arguments
            if (server == null)
            {
                throw new ArgumentNullException("server");
            }

            // store the argument
            this.server = server;
        }
コード例 #2
0
 public TestState(IConsensusServerStateApi server) : base(server)
 {
 }
コード例 #3
0
ファイル: StateTests.cs プロジェクト: oldslowfatstu/NRaft
 public TestState(IConsensusServerStateApi server)
     : base(server)
 {
 }
コード例 #4
0
ファイル: Candidate.cs プロジェクト: oldslowfatstu/NRaft
 /// <summary>
 /// Constructs a new <see cref="Candidate"/>.
 /// </summary>
 /// <param name="server">The <see cref="IConsensusServerStateApi"/> to which this <see cref="State"/> belongs</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="server"/> is null.</exception>
 public Candidate(IConsensusServerStateApi server)
     : base(server)
 {
 }
コード例 #5
0
ファイル: Leader.cs プロジェクト: wmadzha/NRaft
 /// <summary>
 /// Constructs a new <see cref="Leader"/>.
 /// </summary>
 /// <param name="server">The <see cref="IConsensusServerStateApi"/> to which this <see cref="State"/> belongs</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="server"/> is null.</exception>
 public Leader(IConsensusServerStateApi server) : base(server)
 {
 }
コード例 #6
0
ファイル: Follower.cs プロジェクト: oldslowfatstu/NRaft
 /// <summary>
 /// Constructs a new <see cref="Follower"/>.
 /// </summary>
 /// <param name="server">The <see cref="IConsensusServerStateApi"/> to which this <see cref="State"/> belongs</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="server"/> is null.</exception>
 public Follower(IConsensusServerStateApi server)
     : base(server)
 {
 }
コード例 #7
0
 /// <summary>
 /// Constructs a new <see cref="Candidate"/>.
 /// </summary>
 /// <param name="server">The <see cref="IConsensusServerStateApi"/> to which this <see cref="State"/> belongs</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="server"/> is null.</exception>
 public Candidate(IConsensusServerStateApi server) : base(server)
 {
 }
コード例 #8
0
ファイル: Follower.cs プロジェクト: wmadzha/NRaft
 /// <summary>
 /// Constructs a new <see cref="Follower"/>.
 /// </summary>
 /// <param name="server">The <see cref="IConsensusServerStateApi"/> to which this <see cref="State"/> belongs</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="server"/> is null.</exception>
 public Follower(IConsensusServerStateApi server) : base(server)
 {
 }