public static TimeSeriesLink BuildLink(TimeSeries ts, ProjectViewRow row, AttributeRecordingState key, int runNumber) { return new TimeSeriesLink { TimeSeriesName = ts.name, RunNumber = runNumber, TimeSeriesUrl = BuildTimeSeriesUrl(row,key, runNumber), NetworkElement = row.NetworkElementName, RecordingElement = row.ElementName, RecordingVariable = SelectRecordingVariable(key, row) }; }
public static string BuildTimeSeriesUrl(ProjectViewRow row, AttributeRecordingState key, int runNumber) { return string.Format(UriTemplates.TimeSeries.Replace("{runId}", "{0}").Replace("{networkElement}", "{1}").Replace("{recordingElement}","{2}").Replace("{variable}", "{3}"), runNumber, SourceService.URLSafeString(row.NetworkElementName), SourceService.URLSafeString(row.ElementName), SourceService.URLSafeString(SelectRecordingVariable(key,row))); }
private static string SelectRecordingVariable(AttributeRecordingState key, ProjectViewRow row) { return (key.KeyString == "") ? row.ElementName : key.KeyString; }
public static string BuildTimeSeriesUrl(ProjectViewRow row, AttributeRecordingState key, int runNumber)
public static TimeSeriesLink BuildLink(TimeSeries ts, ProjectViewRow row, AttributeRecordingState key, int runNumber)
private static string SelectRecordingVariable(AttributeRecordingState key, ProjectViewRow row) { return((key.KeyString == "") ? row.ElementName : key.KeyString); }