/// <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; }
public TestState(IConsensusServerStateApi server) : base(server) { }
/// <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) { }
/// <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) { }
/// <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) { }