Example #1
0
 /// <inheritdoc />
 public bool TryGetValue(IReadOnlyPropertyDescriptor property, out object value)
 {
     lock (_syncRoot)
     {
         return(_storage.TryGetValue(property, out value));
     }
 }
Example #2
0
        /// <inheritdoc />
        public object GetProperty(IReadOnlyPropertyDescriptor property)
        {
            object value;

            _properties.TryGetValue(property, out value);
            return(value);
        }
Example #3
0
        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);
        }