Example #1
0
        public async Task AutoDiscoverObjectsAsync(ServerEventMessage eventMessage)
        {
            // Check to see if this ObjectType Already Exists
            var objectTypes = await metadataStore.GetObjectTypesAsync();

            if (!objectTypes.Any(t => t.Equals(eventMessage.ObjectType, StringComparison.OrdinalIgnoreCase)))
            {
                logger.LogInformation(nameof(DefaultMetadataService) + " discovered a new ObjectType");
                await metadataStore.AddObjectTypeAsync(eventMessage.ObjectType);
            }
        }