示例#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
 public TestState(IConsensusServerStateApi server)
     : base(server)
 {
 }
示例#4
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)
 {
 }
示例#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
 /// <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)
 {
 }