Exemplo n.º 1
0
        public void QueryPlanCacheHitLogEntry()
        {
            var entry = new QueryPlanCacheHitLogEntry <GraphSchema>("abc123");

            Assert.AreEqual(LogEventIds.QueryCacheHit.Id, entry.EventId);
            Assert.AreEqual("abc123", entry.QueryPlanHashCode);
            Assert.AreEqual(typeof(GraphSchema).FriendlyName(true), entry.SchemaTypeName);
            Assert.IsNotNull(entry.ToString());
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public virtual void QueryPlanCacheFetchHit <TSchema>(string queryHash)
            where TSchema : class, ISchema
        {
            if (!this.IsEnabled(LogLevel.Trace))
            {
                return;
            }

            var entry = new QueryPlanCacheHitLogEntry <TSchema>(queryHash);

            this.LogEvent(LogLevel.Trace, entry);
        }