/// <inheritdoc />
 public void CopyAllValuesTo(IPropertiesBuffer destination)
 {
     foreach (var property in _properties)
     {
         destination.SetValue(property, GetValue(property));
     }
 }
Exemple #2
0
 /// <inheritdoc />
 public void CopyFrom(IPropertiesBuffer properties)
 {
     lock (_syncRoot)
     {
         _storage.CopyFrom(properties);
     }
 }
 /// <inheritdoc />
 public void CopyAllValuesTo(IPropertiesBuffer destination)
 {
     foreach (var property in _source.Properties)
     {
         if (!_hiddenProperties.Contains(property))
         {
             destination.SetValue(property, GetValue(property));
         }
     }
 }
        /// <inheritdoc />
        public void CopyAllValuesTo(IPropertiesBuffer destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(nameof(destination));
            }

            foreach (var pair in _values)
            {
                pair.Value.CopyTo(destination);
            }
        }
 /// <inheritdoc />
 public void GetAllProperties(IPropertiesBuffer destination)
 {
     try
     {
         _logSource.GetAllProperties(destination);
     }
     catch (Exception e)
     {
         BlameExceptionOnPlugin(e);
         throw;
     }
 }
Exemple #6
0
        /// <inheritdoc />
        public void CopyAllValuesTo(IPropertiesBuffer destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(nameof(destination));
            }

            lock (_syncRoot)
            {
                _storage.CopyAllValuesTo(destination);
            }
        }
 /// <inheritdoc />
 public void CopyFrom(IPropertiesBuffer properties)
 {
     foreach (var propertyDescriptor in properties.Properties)
     {
         // By performing a virtual call (CopyFrom) into the typed storage,
         // we can avoid any and all boxing / unboxing of value types.
         if (!_values.ContainsKey(propertyDescriptor))
         {
             _propertyDescriptors.Add(propertyDescriptor);
             var storage = CreateValueStorage(propertyDescriptor);
             storage.CopyFrom(properties);
             _values.Add(propertyDescriptor, storage);
         }
         else
         {
             _values[propertyDescriptor].CopyFrom(properties);
         }
     }
 }
 public void CopyTo(IPropertiesBuffer destination)
 {
     destination.SetValue(_property, _value);
 }
 public void CopyFrom(IPropertiesBuffer properties)
 {
     _value = properties.GetValue(_property);
 }
 /// <inheritdoc />
 public void CopyFrom(IPropertiesBuffer properties)
 {
     properties.CopyAllValuesTo(this);
 }
 /// <summary>
 /// </summary>
 /// <param name="source"></param>
 /// <param name="properties"></param>
 public PropertiesBufferView(IPropertiesBuffer source, IReadOnlyList <IReadOnlyPropertyDescriptor> properties)
 {
     _source     = source;
     _properties = properties;
 }
Exemple #12
0
 /// <inheritdoc />
 public void GetAllProperties(IPropertiesBuffer destination)
 {
     _buffer.GetAllProperties(destination);
 }
 /// <summary>
 ///     Creates a new view onto the given <paramref name="that" /> which contains only those properties
 ///     in the given <paramref name="hiddenProperties" /> list.
 /// </summary>
 /// <param name="that"></param>
 /// <param name="hiddenProperties"></param>
 /// <returns></returns>
 public static IPropertiesBuffer Except(this IPropertiesBuffer that,
                                        IReadOnlyList <IReadOnlyPropertyDescriptor> hiddenProperties)
 {
     return(new PropertiesBufferHidingView(that, hiddenProperties));
 }
 /// <summary>
 ///     Creates a new view onto the given <paramref name="that" /> which contains only those properties
 ///     in the given <paramref name="hiddenProperties" /> list.
 /// </summary>
 /// <param name="that"></param>
 /// <param name="hiddenProperties"></param>
 /// <returns></returns>
 public static IPropertiesBuffer Except(this IPropertiesBuffer that,
                                        params IReadOnlyPropertyDescriptor[] hiddenProperties)
 {
     return(that.Except((IReadOnlyList <IReadOnlyPropertyDescriptor>)hiddenProperties));
 }
 /// <summary>
 /// </summary>
 /// <param name="source"></param>
 /// <param name="hiddenProperties"></param>
 public PropertiesBufferHidingView(IPropertiesBuffer source, IReadOnlyList <IReadOnlyPropertyDescriptor> hiddenProperties)
 {
     _source           = source;
     _hiddenProperties = hiddenProperties;
 }
Exemple #16
0
 /// <inheritdoc />
 public abstract void GetAllProperties(IPropertiesBuffer destination);
 public override void GetAllProperties(IPropertiesBuffer destination)
 {
     throw new NotImplementedException();
 }
Exemple #18
0
 /// <inheritdoc />
 public void GetAllProperties(IPropertiesBuffer destination)
 {
     _source?.GetAllProperties(destination);
 }
Exemple #19
0
 /// <inheritdoc />
 public override void GetAllProperties(IPropertiesBuffer destination)
 {
     _properties.CopyAllValuesTo(destination);
 }
Exemple #20
0
 /// <summary>
 ///     Initializes this object.
 /// </summary>
 /// <param name="properties"></param>
 public PropertiesBufferDebuggerVisualization(IPropertiesBuffer properties)
 {
     _properties = properties;
 }