/// <summary> /// Loads the specified ids. /// </summary> Lazy <T[]> ILazySessionOperations.Load <T>(IEnumerable <string> ids) { return(Lazily.Load <T>(ids, null)); }
/// <summary> /// Loads the specified id. /// </summary> Lazy <T> ILazySessionOperations.Load <T>(string id) { return(Lazily.Load(id, (Action <T>)null)); }
/// <summary> /// Loads the specified entities with the specified id after applying /// conventions on the provided id to get the real document id. /// </summary> /// <remarks> /// This method allows you to call: /// Load{Post}(1) /// And that call will internally be translated to /// Load{Post}("posts/1"); /// /// Or whatever your conventions specify. /// </remarks> public Lazy <TResult> Load <TResult>(ValueType id, Action <TResult> onEval) { var documentKey = Conventions.FindFullDocumentKeyFromNonStringIdentifier(id, typeof(TResult), false); return(Lazily.Load <TResult>(documentKey)); }
/// <summary> /// Loads the specified ids. /// </summary> /// <param name="ids">The ids.</param> Lazy <TResult[]> ILazySessionOperations.Load <TResult>(params string[] ids) { return(Lazily.Load <TResult>(ids, null)); }
Lazy <T[]> ILazySessionOperations.Load <T>(params ValueType[] ids) { var documentKeys = ids.Select(id => Conventions.FindFullDocumentKeyFromNonStringIdentifier(id, typeof(T), false)); return(Lazily.Load <T>(documentKeys, null)); }
/// <summary> /// Loads the specified entities with the specified id after applying /// conventions on the provided id to get the real document id. /// </summary> /// <remarks> /// This method allows you to call: /// Load{Post}(1) /// And that call will internally be translated to /// Load{Post}("posts/1"); /// /// Or whatever your conventions specify. /// </remarks> Lazy <TResult> ILazySessionOperations.Load <TResult>(ValueType id) { return(Lazily.Load <TResult>(id, null)); }
Lazy <TResult> ILazySessionOperations.Load <TResult>(string id, Type transformerType, Action <TResult> onEval) { var lazy = Lazily.Load(new[] { id }, transformerType, onEval); return(new Lazy <TResult>(() => lazy.Value[0])); }
Lazy <TResult[]> ILazySessionOperations.Load <TTransformer, TResult>(IEnumerable <string> ids, Action <TResult> onEval) { return(Lazily.Load(ids, typeof(TTransformer), onEval)); }
/// <summary> /// Loads the specified entity with the specified id after applying /// conventions on the provided id to get the real document id. /// </summary> /// <remarks> /// This method allows you to call: /// Load{Post}(1) /// And that call will internally be translated to /// Load{Post}("posts/1"); /// /// Or whatever your conventions specify. /// </remarks> Lazy <T> ILazySessionOperations.Load <T>(ValueType id, Action <T> onEval) { var documentKey = Conventions.FindFullDocumentKeyFromNonStringIdentifier(id, typeof(T), false); return(Lazily.Load(documentKey, onEval)); }
Lazy <T[]> ILazySessionOperations.Load <T>(IEnumerable <ValueType> ids, Action <T[]> onEval) { var documentKeys = ids.Select(id => Conventions.FindFullDocumentKeyFromNonStringIdentifier(id, typeof(T), false)); return(Lazily.Load(documentKeys, onEval)); }
/// <summary> /// Loads the specified entity with the specified id after applying /// conventions on the provided id to get the real document id. /// </summary> /// <remarks> /// This method allows you to call: /// Load{Post}(1) /// And that call will internally be translated to /// Load{Post}("posts/1"); /// /// Or whatever your conventions specify. /// </remarks> Lazy <T> ILazySessionOperations.Load <T>(ValueType id) { return(Lazily.Load(id, (Action <T>)null)); }
Lazy <TResult> ILazySessionOperations.Load <TTransformer, TResult>(string id, Action <TResult> onEval) { return(Lazily.Load(id, typeof(TTransformer), onEval)); }
/// <summary> /// Loads the specified ids. /// </summary> Lazy <Dictionary <string, T> > ILazySessionOperations.Load <T>(IEnumerable <string> ids) { return(Lazily.Load <T>(ids, null)); }
Lazy <TResult> ILazySessionOperations.Load <TTransformer, TResult>(string id) { var lazy = Lazily.Load <TTransformer, TResult>(new[] { id }); return(new Lazy <TResult>(() => lazy.Value[0])); }
Lazy <TResult> ILazySessionOperations.Load <TTransformer, TResult>(string id, Action <ILoadConfiguration> configure, Action <TResult> onEval) { var lazy = Lazily.Load <TTransformer, TResult>(new[] { id }, configure); return(new Lazy <TResult>(() => lazy.Value[0])); }