Esempio n. 1
0
        public IRestEndpoint Next(INextPath path)
        {
            var identifierInfo = Context.Services.UrlHelper.GetIdentifierInfo(path);

            if (identifierInfo.IsDictionary)
            {
                IRestDictionary dictionary = Collection.ToDictionary(identifierInfo.Name);
                return(new RestDictionaryEndpoint(Context, dictionary));
            }
            else
            {
                IRestItem item = Collection.GetItem(identifierInfo.Value, identifierInfo.Name);
                return(new RestItemEndpoint(Context, item));
            }
        }
Esempio n. 2
0
 internal RestDictionaryEndpoint(IEndpointContext endpointContext, IRestDictionary dictionary)
 {
     Context    = endpointContext;
     Dictionary = dictionary;
 }