/// <inheritdoc /> public void CopyAllValuesTo(IPropertiesBuffer destination) { foreach (var property in _properties) { destination.SetValue(property, GetValue(property)); } }
/// <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; } }
/// <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; }
/// <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; }
/// <inheritdoc /> public abstract void GetAllProperties(IPropertiesBuffer destination);
public override void GetAllProperties(IPropertiesBuffer destination) { throw new NotImplementedException(); }
/// <inheritdoc /> public void GetAllProperties(IPropertiesBuffer destination) { _source?.GetAllProperties(destination); }
/// <inheritdoc /> public override void GetAllProperties(IPropertiesBuffer destination) { _properties.CopyAllValuesTo(destination); }
/// <summary> /// Initializes this object. /// </summary> /// <param name="properties"></param> public PropertiesBufferDebuggerVisualization(IPropertiesBuffer properties) { _properties = properties; }