示例#1
0
        public static async Task <SaveResult <object> > ExecResultAsync(this IHeap heap, HeapRequest query, Guid idempotencyToken = default(Guid), INode node = null)
        {
            var atr  = HeapAttribute.Lookup <HeapProcAttribute>(query.NonNull(nameof(query)).GetType());
            var area = heap.NonNull(nameof(heap))[atr.Area];

            return(await area.ExecuteAsync(query, idempotencyToken, node));
        }
示例#2
0
        /// <summary>
        /// Returns a typed space for objects of the specified type
        /// </summary>
        public static ISpace <T> GetSpace <T>(this IHeap heap) where T : HeapObject
        {
            var atr  = HeapAttribute.Lookup <HeapSpaceAttribute>(typeof(T));
            var area = heap.NonNull(nameof(heap))[atr.Area];

            return(area.GetSpace <T>());
        }