/// <nodoc /> public ReadOnlyMemoryMemoizationSession(string name, MemoryMemoizationStore memoizationStore) { Contract.Requires(name != null); Contract.Requires(memoizationStore != null); Name = name; Tracer = new Tracer(nameof(ReadOnlyMemoryMemoizationSession)); MemoizationStore = memoizationStore; }
/// <summary> /// Initializes a new instance of the <see cref="MemoryMemoizationSession" /> class. /// </summary> /// <remarks> /// Allowing <paramref name="contentSession"/> to be null to allow the creation of uncoupled MemoizationSessions. /// While we might extend this to the actual interface at some point, for now it's just a test hook /// to compare to the previous behavior. With a null content session, metadata will be automatically /// overwritten because we're unable to check whether or not content is missing. /// </remarks> public MemoryMemoizationSession(string name, MemoryMemoizationStore memoizationStore, IContentSession contentSession = null) : base(name, memoizationStore) { _contentSession = contentSession; }