예제 #1
0
        public async Task <IEnumerable <IEvent> > GetEventsAsync(Guid entityId)
        {
            var records = await Options.GetCloudTable(EventTable)
                          .ExecuteTableQueryAsync(new TableQuery <EventTableEntity>()
                                                  .Where(TableQuery.GenerateFilterCondition(
                                                             "PartitionKey",
                                                             QueryComparisons.Equal,
                                                             entityId.ToString())));

            return(records.OrderBy(r => r.Timestamp)
                   .Select(r => JsonConvert.DeserializeObject(r.Data, DomainAssembly.GetType(r.Type)) as IEvent));
        }
예제 #2
0
        public override Type GetTypeFromTypeName(string typeName)
        {
            IClassMap classMap = this.context.DomainMap.GetClassMap(typeName);

            if (classMap != null)
            {
                Type type = this.Context.AssemblyManager.GetTypeFromClassMap(classMap);
                if (type != null)
                {
                    return(type);
                }
            }
            return(DomainAssembly.GetType(typeName));
        }
 public virtual Type GetTypeFromTypeName(string typeName)
 {
     return(DomainAssembly.GetType(typeName));
 }