public T QuerySingleRelative <T>(string query, bool isLazy = false, bool inferType = false) where T : class
 {
     return(RequestContext.SitecoreService.GetItemByQuery <T>(query,
                                                              b => b.RelativeTo(RequestContext.ContextItem)
                                                              .Lazy(ISitecoreServiceLegacyExtensions.GetLazyLoading(isLazy))
                                                              .InferType(inferType)));
 }
 public object GetCurrentItem(Type type, bool isLazy = false, bool inferType = false)
 {
     return(RequestContext.GetContextItem(
                b => b.Type(type)
                .Lazy(ISitecoreServiceLegacyExtensions.GetLazyLoading(isLazy))
                .InferType(inferType)));
 }
 public T GetCurrentItem <T, TK>(TK param1, bool isLazy = false, bool inferType = false) where T : class
 {
     return(RequestContext.GetContextItem <T>(
                b => b.Lazy(ISitecoreServiceLegacyExtensions.GetLazyLoading(isLazy))
                .InferType(inferType)
                .AddParam(param1)
                ));
 }
 public T GetRootItem <T>(bool isLazy = false, bool inferType = false) where T : class
 {
     return(RequestContext.GetRootItem <T>(b =>
                                           b.Lazy(ISitecoreServiceLegacyExtensions.GetLazyLoading(isLazy)).InferType(inferType)));
 }