https://github.com/vvvv/VL.StandardLibs/blob/40e399b90fc6fdf5382ecfd7e100901a8aa9048c/VL.Core/src/Reactive/Channel.cs#L104C9-L104C72
Hi, there seems to be an issue in the IChannel interface now:
public interface IChannel : IHasAttributes, IDisposable
{
// ...
internal IChannel<Spread<Attribute>> AttributesChannel { get; }
}
No sure if it's intended for interface member to have an internal flag, making this interface unimplementable.
However the purpose of this issue, is: can we have please have an inheritable channel in the core, what I mean is something like this:
public class MyCustomChannel : Channel<object> {
// my custom other stuff here
}
The problem that currently I had to fully mimic channel, by routing it's members:
public abstract class ChannelBase<T> : IChannel<T>, IDisposable
{
protected readonly IChannel<T> _internalChannel;
protected ChannelBase(IChannel<T> internalChannel)
{
_internalChannel = internalChannel;
}
public T? Value
{
get => _internalChannel.Value;
set => _internalChannel.Value = value;
}
public void SetValueAndAuthor(T? value, string? author) =>
_internalChannel.SetValueAndAuthor(value, author);
public Func<T?, Optional<T?>>? Validator
{
set => _internalChannel.Validator = value;
}
public Type ClrTypeOfValues => _internalChannel.ClrTypeOfValues;
public ImmutableArray<object> Components
{
get => _internalChannel.Components;
set => _internalChannel.Components = value;
}
public IChannel<object> ChannelOfObject => _internalChannel.ChannelOfObject;
public bool Enabled
{
get => _internalChannel.Enabled;
set => _internalChannel.Enabled = value;
}
public bool IsBusy => _internalChannel.IsBusy;
public object? Object
{
get => _internalChannel.Object;
set => _internalChannel.Object = value;
}
public string? LatestAuthor => _internalChannel.LatestAuthor;
public void SetObjectAndAuthor(object? @object, string? author) =>
_internalChannel.SetObjectAndAuthor(@object, author);
public IDisposable BeginChange() => _internalChannel.BeginChange();
public string? Path => _internalChannel.Path;
public int Revision => _internalChannel.Revision;
public AccessorNodes AccessorNodes => _internalChannel.AccessorNodes;
public bool IsInitialized => _internalChannel.IsInitialized;
public bool HasBeenRequested => _internalChannel.HasBeenRequested;
public bool HasValue => _internalChannel.HasValue;
public bool AcceptsValue => _internalChannel.AcceptsValue;
// Added implementation for the missing interface member
internal IChannel<Spread<Attribute>> AttributesChannel => null;
IMonadicValue<T> IMonadicValue<T>.SetValue(T? value) =>
((IMonadicValue<T>)_internalChannel).SetValue(value);
public void OnCompleted() => _internalChannel.OnCompleted();
public void OnError(Exception error) => _internalChannel.OnError(error);
public void OnNext(T? value) => _internalChannel.OnNext(value);
public IDisposable Subscribe(IObserver<T?> observer) =>
_internalChannel.Subscribe(observer);
public Spread<Attribute> Attributes => _internalChannel.Attributes;
private bool _disposed;
public virtual void Dispose()
{
if (_disposed)
return;
_disposed = true;
_internalChannel.Dispose();
}
}
But with this latest change I can't compile anyhow, anymore:
public IChannel<Spread<Attribute>> AttributesChannel => _internalChannel.AttributesChannel;
'ChannelBase<T>.AttributesChannel.get' cannot implicitly implement an inaccessible member.
@gregsn can we please make the interface member public
https://github.com/vvvv/VL.StandardLibs/blob/40e399b90fc6fdf5382ecfd7e100901a8aa9048c/VL.Core/src/Reactive/Channel.cs#L104C9-L104C72
Hi, there seems to be an issue in the IChannel interface now:
No sure if it's intended for interface member to have an
internalflag, making this interface unimplementable.However the purpose of this issue, is: can we have please have an inheritable channel in the core, what I mean is something like this:
The problem that currently I had to fully mimic channel, by routing it's members:
But with this latest change I can't compile anyhow, anymore:
'ChannelBase<T>.AttributesChannel.get' cannot implicitly implement an inaccessible member.@gregsn can we please make the interface member public