private static string GetTypeName(DelegatePluginCatalogOptions options)
        {
            if (options?.TypeNameGenerator != null)
            {
                return(options.TypeNameGenerator(options));
            }

            return("GeneratedType");
        }
Exemple #2
0
        private DelegateToTypeWrapperOptions ConvertOptions()
        {
            var convRules = GetConversionRules();

            return(new DelegateToTypeWrapperOptions()
            {
                ConversionRules = convRules,
                MethodName = _options.MethodName,
                NamespaceName = _options.NamespaceName,
                TypeName = _options.TypeName,
                MethodNameGenerator = wrapperOptions => _options.MethodNameGenerator(_options),
                NamespaceNameGenerator = wrapperOptions => _options.NamespaceNameGenerator(_options),
                TypeNameGenerator = wrapperOptions => _options.TypeNameGenerator(_options),
            });
        }