/// <inheritdoc /> public void ClearSpanBuffer() { lock (Spans) { Spans.Clear(); } }
// -> Creates user sectrion from external collection... (i.e. from loaded file) public void UpdateFromSpatialModel(IEnumerable <ISpanModel> spatialModel) { int sectionSize = spatialModel.Count(); int index = 0; Spans.Clear(); // cutting proper size for (int i = 0; i < sectionSize; i++) { JustAddSpan(); } foreach (ISpanModel rawSpan in spatialModel) { Spans[index].OrdinalDescription = rawSpan.TowerDescription; Spans[index].TowerAbscissa = rawSpan.TowerAbscissa; Spans[index].TowerOrdinate = rawSpan.TowerOrdinate; Spans[index].TowerAPHeight = rawSpan.AttachmentPointHeight; SetInsulatorSetFromExternalData(index, sectionSize, rawSpan.InsulatorSetCode, rawSpan.InsulatorArmLength, rawSpan.InsulatorArmWeight, rawSpan.InsulatorOpeningAngle); Spans[index].InsulatorSetIceLoad = rawSpan.InsulatorIceLoad; Spans[index].SpanIceLoad = rawSpan.SpanIceLoad; Spans[index].SpanWindLoad = rawSpan.SpanWindLoad; index++; } //CheckInternalIntegrity(); }
private void LowLevelSectionErase() { foreach (UserSpan span in Spans) { span.PropertyChanged -= OnUserSpanPropertyChanged; } Spans.Clear(); }
/// <inheritdoc /> public void ClearSpanBuffer() { _logger.Trace("Waiting for lock in SpanRecorder."); lock (Spans) { _logger.Trace("Lock freed, clearing span buffer."); Spans.Clear(); } }
private void UpdateFromStringArray(string[] stringArray) { int sectionSize = stringArray.Count(); string[] stringLine; double?[] doubleLine; Spans.Clear(); // cutting proper size for (int k = 0; k < sectionSize; k++) { JustAddSpan(); } for (int i = 0; i < sectionSize; i++) { stringLine = stringArray[i].Split(';'); if (stringLine.Count() == 12) { Spans[i].OrdinalDescription = stringLine[0]; doubleLine = new double?[10]; for (int p = 1; p < 11; p++) { doubleLine[p - 1] = stringLine[p + 1].AdvancedParseToNullableDouble(); } if (_alternativeInputMode) { Spans[i].SpanLength = doubleLine[3]; } else { Spans[i].TowerAbscissa = doubleLine[0]; } Spans[i].TowerOrdinate = doubleLine[1]; Spans[i].TowerAPHeight = doubleLine[2]; Spans[i].InsulatorSetIceLoad = doubleLine[7]; Spans[i].SpanIceLoad = doubleLine[8]; Spans[i].SpanWindLoad = doubleLine[9]; SetInsulatorSetFromExternalData(i, sectionSize, stringLine[1], doubleLine[4], doubleLine[5], doubleLine[6]); } } }
public void ClearSpanBuffer() { Spans.Clear(); }