/// <summary> /// Creates an initialized instance. /// </summary> /// <param name="unitName">Name of the readout unit.</param> /// <param name="chainBuildProgress">The holder of the cluster chain build progress information.</param> public BuildProgress(string unitName, TNRNetClusterChainBuilder.BuildProgress chainBuildProgress ) { UnitName = unitName; ChainBuildProgress = chainBuildProgress; return; }
/// <summary> /// Creates an initialized instance. /// </summary> /// <param name="groupName">Name of the One Takes All group.</param> /// <param name="chainBuildProgress">The holder of the cluster chain build progress information.</param> public BuildProgress(string groupName, TNRNetClusterChainBuilder.BuildProgress chainBuildProgress ) { GroupName = groupName; ChainBuildProgress = chainBuildProgress; return; }
//Methods private void OnChainBuildProgressChanged(TNRNetClusterChainBuilder.BuildProgress chainBuildProgress) { //Prepare readout unit version BuildProgress buildProgress = new BuildProgress(Name, chainBuildProgress); //Raise event ReadoutUnitBuildProgressChanged?.Invoke(buildProgress); return; }
//Methods private void OnChainBuildProgressChanged(TNRNetClusterChainBuilder.BuildProgress chainBuildProgress) { //Prepare group version BuildProgress buildProgress = new BuildProgress(Name, chainBuildProgress); //Raise event OTAGBuildProgressChanged?.Invoke(buildProgress); return; }
//Methods /// <summary> /// Displays information about the network cluster chain build process progress. /// </summary> /// <param name="buildProgress">The current state of the build process.</param> protected void OnClusterChainBuildProgressChanged(TNRNetClusterChainBuilder.BuildProgress buildProgress) { int reportEpochsInterval = 5; //Progress info if (buildProgress.ShouldBeReported || (buildProgress.EndNetworkEpochNum % reportEpochsInterval == 0)) { //Build progress report message string progressText = buildProgress.GetInfoText(4); //Report the progress _log.Write(progressText, !(buildProgress.NewEndNetwork)); } return; }