FubuMVC.Core.Registration.Querying.ChainResolutionCache.FindUnique C# (CSharp) Method

FindUnique() public method

public FindUnique ( object model, string category = null ) : BehaviorChain
model object
category string
return BehaviorChain
        public BehaviorChain FindUnique(object model, string category = null)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            var modelType = model.GetType();

            var search = new ChainSearch
            {
                Type = modelType, TypeMode = TypeSearchMode.InputModelOnly, CategoryOrHttpMethod = category
            };

            return Find(search);
        }