/// <inheritdoc /> public bool TryGetValue(IReadOnlyPropertyDescriptor property, out object value) { lock (_syncRoot) { return(_storage.TryGetValue(property, out value)); } }
/// <inheritdoc /> public object GetProperty(IReadOnlyPropertyDescriptor property) { object value; _properties.TryGetValue(property, out value); return(value); }
private Percentage ComputePercentageProcessed() { if (!_propertiesBuffer.TryGetValue(Core.Properties.PercentageProcessed, out var sourcePercentage)) { return(Percentage.Zero); } if (_fullSourceSection.Count <= 0) { return(sourcePercentage); } var ownPercentage = Percentage.Of(_currentSourceIndex, _fullSourceSection.Count); var totalPercentage = (ownPercentage * sourcePercentage).Clamped(); return(totalPercentage); }