INNER CODE UNIT · C#

GetFieldName

daxnet/apworks-core · src/Apworks.EventStore.AdoNet/AdoNetEventStoreConfiguration.cs:79

        public string GetFieldName(Expression<Func<EventDescriptor, object>> propertyExpression) => GetFieldName(Utils.GetPropertyNameFromExpression(propertyExpression));

        public bool HasKeyGenerator { get => this.keyGenerator.GetType() != typeof(NullKeyGenerator<Guid>); }

        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());

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…