/// <summary> /// Initializes a new instance of the <see cref="LocatorBasedDispatcher"/> class. /// </summary> /// <param name="server">The server which will hold this instance.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="server"/> is <c>null</c>. /// </exception> public LocatorBasedDispatcher( RpcServer server ) : base( server ) { this._locator = server.Configuration.ServiceTypeLocatorProvider( server.Configuration ); this._descriptionTable = server.Configuration.UseFullMethodName ? new VersionedOperationCatalog() : ( OperationCatalog )new FlatOperationCatalog(); foreach ( var service in this._locator.FindServices() ) { foreach ( var operation in OperationDescription.FromServiceDescription( this.Runtime, service ) ) { this._descriptionTable.Add( operation ); } } }
/// <summary> /// Initializes a new instance of the <see cref="LocatorBasedDispatcher"/> class. /// </summary> /// <param name="server">The server which will hold this instance.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="server"/> is <c>null</c>. /// </exception> public LocatorBasedDispatcher(RpcServer server) : base(server) { this._locator = server.Configuration.ServiceTypeLocatorProvider(server.Configuration); this._descriptionTable = server.Configuration.UseFullMethodName ? new VersionedOperationCatalog() : (OperationCatalog) new FlatOperationCatalog(); foreach (var service in this._locator.FindServices()) { foreach (var operation in OperationDescription.FromServiceDescription(this.Runtime, service)) { this._descriptionTable.Add(operation); } } }