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

            return("GeneratedNamespace");
        }
Beispiel #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),
            });
        }