@@ -15,7 +15,8 @@ namespace Microsoft.ML.Runtime.Data
1515 /// Base class for channel providers. This is a common base class for<see cref="HostEnvironmentBase{THostEnvironmentBase}"/>.
1616 /// The ParentFullName, ShortName, and FullName may be null or empty.
1717 /// </summary>
18- public abstract class ChannelProviderBase : IExceptionContext
18+ [ BestFriend ]
19+ internal abstract class ChannelProviderBase : IExceptionContext
1920 {
2021 /// <summary>
2122 /// Data keys that are attached to the exception thrown via the exception context.
@@ -79,43 +80,22 @@ public virtual TException Process<TException>(TException ex)
7980 /// <summary>
8081 /// Message source (a channel) that generated the message being dispatched.
8182 /// </summary>
82- public interface IMessageSource
83+ [ BestFriend ]
84+ internal interface IMessageSource
8385 {
8486 string ShortName { get ; }
8587 string FullName { get ; }
8688 bool Verbose { get ; }
8789 }
8890
89- /// <summary>
90- /// A <see cref="IHostEnvironment"/> that is also a channel listener can attach
91- /// listeners for messages, as sent through <see cref="IChannelProvider.StartPipe{TMessage}"/>.
92- /// </summary>
93- public interface IMessageDispatcher : IHostEnvironment
94- {
95- /// <summary>
96- /// Listen on this environment to messages of a particular type.
97- /// </summary>
98- /// <typeparam name="TMessage">The message type</typeparam>
99- /// <param name="listenerFunc">The action to perform when a message of the
100- /// appropriate type is received.</param>
101- void AddListener < TMessage > ( Action < IMessageSource , TMessage > listenerFunc ) ;
102-
103- /// <summary>
104- /// Removes a previously added listener.
105- /// </summary>
106- /// <typeparam name="TMessage">The message type</typeparam>
107- /// <param name="listenerFunc">The previous listener function that is now being removed.</param>
108- void RemoveListener < TMessage > ( Action < IMessageSource , TMessage > listenerFunc ) ;
109- }
110-
11191 /// <summary>
11292 /// A basic host environment suited for many environments.
11393 /// This also supports modifying the concurrency factor, provides the ability to subscribe to pipes via the
11494 /// AddListener/RemoveListener methods, and exposes the <see cref="ProgressReporting.ProgressTracker"/> to
11595 /// query progress.
11696 /// </summary>
11797 [ BestFriend ]
118- internal abstract class HostEnvironmentBase < TEnv > : ChannelProviderBase , IHostEnvironment , IDisposable , IChannelProvider , IMessageDispatcher
98+ internal abstract class HostEnvironmentBase < TEnv > : ChannelProviderBase , IHostEnvironment , IDisposable , IChannelProvider
11999 where TEnv : HostEnvironmentBase < TEnv >
120100 {
121101 /// <summary>
0 commit comments