/// <inheritdoc /> protected override async Task <BoolResult> ShutdownCoreAsync(OperationContext context) { // Close all sessions? var result = await base.ShutdownCoreAsync(context); result &= await InnerStore.ShutdownAsync(context); return(result); }
protected virtual void CopyItemsTo(T[] array, int arrayIndex) { using (IEnumerator <S> e = InnerStore.GetEnumerator()) { while (e.MoveNext() && arrayIndex < array.Length) { array[arrayIndex++] = GetItem(e.Current); } } }
protected virtual bool ContainsItem(T value) { using (IEnumerator <S> e = InnerStore.GetEnumerator()) while (e.MoveNext()) { if (Equals(GetItem(e.Current), value)) { return(true); } } return(false); }
private CreateSessionResult <T> CreateSession <T>(Context context, string name, ImplicitPin implicitPin) where T : class, IName { var operationContext = OperationContext(context); return(operationContext.PerformOperation( Tracer, () => { var innerSessionResult = InnerStore.CreateSession(context, name, implicitPin).ThrowIfFailure(); var session = new VirtualizedContentSession(this, innerSessionResult.Session, name); return new CreateSessionResult <T>(session as T); })); }
/// <inheritdoc /> protected override async Task <BoolResult> StartupCoreAsync(OperationContext context) { await InnerStore.StartupAsync(context).ThrowIfFailure(); return(await base.StartupCoreAsync(context)); }
/// <inheritdoc /> public Task <GetStatsResult> GetStatsAsync(Context context) { return(InnerStore.GetStatsAsync(context)); }
/// <inheritdoc /> public void PostInitializationCompleted(Context context, BoolResult result) => InnerStore.PostInitializationCompleted(context, result);