Beispiel #1
0
        /// <inheritdoc />
        public CreateSessionResult <IContentSession> CreateSession(Context context, string name, ImplicitPin implicitPin)
        {
            return(CreateSessionCall.Run(_tracer, OperationContext(context), name, () =>
            {
                CreateSessionResult <IContentSession> innerSessionResult = InnerContentStore.CreateSession(context, name, implicitPin);

                if (innerSessionResult.Succeeded)
                {
                    var session = new DistributedContentSession <T>(
                        name,
                        innerSessionResult.Session,
                        _contentLocationStore,
                        _contentAvailabilityGuarantee,
                        _distributedCopier,
                        _localMachineLocation,
                        pinCache: _pinCache,
                        contentTrackerUpdater: _contentTrackerUpdater,
                        settings: _settings);
                    return new CreateSessionResult <IContentSession>(session);
                }

                return new CreateSessionResult <IContentSession>(innerSessionResult, "Could not initialize inner content session with error");
            }));
        }
 internal IContentLocationStore GetContentLocationStore(DistributedContentSession session)
 {
     return(session.ContentLocationStore);
 }