예제 #1
0
        public SchemaDefinitionUpdated GetSchemaAsEvent(Type baseType, string applicationName, Func <Type, string> topicResolver = null)
        {
            var list   = GetSchema(baseType, topicResolver);
            var @event = new SchemaDefinitionUpdated(list, applicationName);

            return(@event);
        }
예제 #2
0
        public SchemaDefinitionUpdated BuildSchemaUpdatedEvent(List <SchemaDefinition> schemas, string applicationName)
        {
            if (schemas == null || !schemas.Any())
            {
                throw new ArgumentException("schemas", "Schemas are null or empty");
            }

            if (string.IsNullOrWhiteSpace(applicationName))
            {
                throw new ArgumentException("applicationName", "ApplicationName must be specified");
            }

            var @event = new SchemaDefinitionUpdated(schemas, applicationName);

            return(@event);
        }