Example #1
0
 /// <summary>
 /// Returns all components that implement the specified interface.
 /// </summary>
 public IEnumerable <ComponentInfo> GetAllComponents(Type interfaceType)
 {
     Contracts.CheckValue(interfaceType, nameof(interfaceType));
     return(_components.Where(x => x.InterfaceType == interfaceType).OrderBy(x => x.Name));
 }
Example #2
0
 /// <summary>
 /// Redirects the channel output through the specified writers.
 /// </summary>
 /// <remarks>This method is not thread-safe.</remarks>
 internal IDisposable RedirectChannelOutput(TextWriter newOutWriter, TextWriter newErrWriter)
 {
     Contracts.CheckValue(newOutWriter, nameof(newOutWriter));
     Contracts.CheckValue(newErrWriter, nameof(newErrWriter));
     return(new OutputRedirector(this, newOutWriter, newErrWriter));
 }