INNER CODE UNIT · C#
GenerateKey
daxnet/apworks-core · src/Apworks.EventStore.AdoNet/AdoNetEventStoreConfiguration.cs:83
public Guid GenerateKey(EventDescriptor eventDescriptor) => this.keyGenerator.Generate(eventDescriptor);
private void InitializeTableFieldDelegationsWithDefaultValues()
{
this.tableFieldRegistrations.Clear();
var properties = from prop in typeof(EventDescriptor)
.GetTypeInfo()
.GetProperties(BindingFlags.Public | BindingFlags.Instance)
where prop.CanRead &&
(prop.PropertyType.IsSimpleType() || prop.PropertyType == typeof(object))
select prop;
foreach (var p in properties)
{
this.tableFieldRegistrations.Add(p.Name, p.Name.ToUpper());
}
}
}
}