// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNet.SignalR.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.AspNet.SignalR.Hubs
{
///
/// Describes a hub method provider that builds a collection of available methods on a given hub.
///
public interface IMethodDescriptorProvider
{
///
/// Retrieve all methods on a given hub.
///
/// Hub descriptor object.
/// Available methods.
IEnumerable GetMethods(HubDescriptor hub);
///
/// Tries to retrieve a method.
///
/// Hub descriptor object
/// Name of the method.
/// Descriptor of the method, if found. Null otherwise.
/// Method parameters to match.
/// True, if a method has been found.
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "This is a well known pattern for efficient lookup")]
bool TryGetMethod(HubDescriptor hub, string method, out MethodDescriptor descriptor, IList parameters);
}
}