private void BuildForAllEndpointSubclassesOf <TControllerBaseType>(Action <TypeMetadataBuilder> additionalConfiguration, Assembly endpointContainingAssembly)
        {
            ValidateSetup();
            var metadataModule = new TypeMetadataBuilder(typeof(TControllerBaseType), endpointContainingAssembly);

            if (additionalConfiguration != null)
            {
                additionalConfiguration(metadataModule);
            }
            BuildMetadata(metadataModule);
        }
Example #2
0
        public static void BuildForConfiguration(Action <TypeMetadataBuilder> configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration", "You must specify a configuration or use a different overload");
            }

            ValidateSetup();
            var metadataModule = new TypeMetadataBuilder();

            configuration(metadataModule);
            BuildMetadata(metadataModule);
        }
 private void BuildMetadata(TypeMetadataBuilder builder)
 {
     _metadataModule = GlobalSettings.JsonSerializer.ToJsonString(builder.Build());
 }