Exemplo n.º 1
0
 /// <inheritdoc />
 public void CopyAllValuesTo(IPropertiesBuffer destination)
 {
     foreach (var property in _properties)
     {
         destination.SetValue(property, GetValue(property));
     }
 }
Exemplo n.º 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));
         }
     }
 }
Exemplo n.º 4
0
        /// <inheritdoc />
        public void CopyAllValuesTo(IPropertiesBuffer destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(nameof(destination));
            }

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

            lock (_syncRoot)
            {
                _storage.CopyAllValuesTo(destination);
            }
        }
Exemplo n.º 7
0
 /// <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);
         }
     }
 }
Exemplo n.º 8
0
 public void CopyTo(IPropertiesBuffer destination)
 {
     destination.SetValue(_property, _value);
 }
Exemplo n.º 9
0
 public void CopyFrom(IPropertiesBuffer properties)
 {
     _value = properties.GetValue(_property);
 }
Exemplo n.º 10
0
 /// <inheritdoc />
 public void CopyFrom(IPropertiesBuffer properties)
 {
     properties.CopyAllValuesTo(this);
 }
Exemplo n.º 11
0
 /// <summary>
 /// </summary>
 /// <param name="source"></param>
 /// <param name="properties"></param>
 public PropertiesBufferView(IPropertiesBuffer source, IReadOnlyList <IReadOnlyPropertyDescriptor> properties)
 {
     _source     = source;
     _properties = properties;
 }
Exemplo n.º 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;
 }
Exemplo n.º 16
0
 /// <inheritdoc />
 public abstract void GetAllProperties(IPropertiesBuffer destination);
Exemplo n.º 17
0
 public override void GetAllProperties(IPropertiesBuffer destination)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 18
0
 /// <inheritdoc />
 public void GetAllProperties(IPropertiesBuffer destination)
 {
     _source?.GetAllProperties(destination);
 }
Exemplo n.º 19
0
 /// <inheritdoc />
 public override void GetAllProperties(IPropertiesBuffer destination)
 {
     _properties.CopyAllValuesTo(destination);
 }
Exemplo n.º 20
0
 /// <summary>
 ///     Initializes this object.
 /// </summary>
 /// <param name="properties"></param>
 public PropertiesBufferDebuggerVisualization(IPropertiesBuffer properties)
 {
     _properties = properties;
 }