本文整理汇总了C#中MetadataTypesConfig类的典型用法代码示例。如果您正苦于以下问题:C# MetadataTypesConfig类的具体用法?C# MetadataTypesConfig怎么用?C# MetadataTypesConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MetadataTypesConfig类属于命名空间,在下文中一共展示了MetadataTypesConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMetadataTypes
public MetadataTypes GetMetadataTypes(IRequest req, MetadataTypesConfig config = null, Func<Operation, bool> predicate = null)
{
return GetMetadataTypesGenerator(config).GetMetadataTypes(req, predicate);
}
示例2: GetMetadataTypesGenerator
internal MetadataTypesGenerator GetMetadataTypesGenerator(MetadataTypesConfig config)
{
return new MetadataTypesGenerator(meta, config ?? defaults);
}
示例3: VbNetGenerator
public VbNetGenerator(MetadataTypesConfig config)
{
Config = config;
}
示例4: NativeTypesMetadata
public NativeTypesMetadata(ServiceMetadata meta, MetadataTypesConfig defaults)
{
this.meta = meta;
this.defaults = defaults;
}
示例5: IgnoreType
public static bool IgnoreType(this MetadataType type, MetadataTypesConfig config, List<string> overrideIncludeType = null)
{
// If is a systemType and export types doesn't include this
if (type.IgnoreSystemType() && config.ExportTypes.All(x => x.Name != type.Name))
return true;
var includes = overrideIncludeType ?? config.IncludeTypes;
if (includes != null && !includes.Contains(type.Name))
return true;
if (config.ExcludeTypes != null &&
config.ExcludeTypes.Any(x => type.Name == x || type.Name.StartsWith(x + "`")))
return true;
return false;
}
示例6: CSharpGenerator
public CSharpGenerator(MetadataTypesConfig config)
{
Config = config;
feature = HostContext.GetPlugin<NativeTypesFeature>();
}
示例7: IgnoreType
public static bool IgnoreType(this MetadataType type, MetadataTypesConfig config)
{
if (type.IgnoreSystemType())
return true;
if (config.IncludeTypes != null && !config.IncludeTypes.Contains(type.Name))
return true;
if (config.ExcludeTypes != null && config.ExcludeTypes.Contains(type.Name))
return true;
return false;
}
示例8: MetadataTypesGenerator
public MetadataTypesGenerator(ServiceMetadata meta, MetadataTypesConfig config)
{
this.meta = meta;
this.config = config;
}
示例9: JavaGenerator
public JavaGenerator(MetadataTypesConfig config)
{
Config = config;
}
示例10: GetMetadataTypes
public MetadataTypes GetMetadataTypes(IRequest req, MetadataTypesConfig config = null)
{
return GetMetadataTypesGenerator(config).GetMetadataTypes(req);
}
示例11: SwiftGenerator
public SwiftGenerator(MetadataTypesConfig config)
{
Config = config;
feature = HostContext.GetPlugin<NativeTypesFeature>();
AllTypes = new List<MetadataType>();
}
示例12: GetMetadataTypes
public MetadataTypes GetMetadataTypes(IRequest req, MetadataTypesConfig config = null)
{
return new MetadataTypesGenerator(meta, config ?? defaults).GetMetadataTypes(req);
}
示例13: IgnoreType
public static bool IgnoreType(this MetadataType type, MetadataTypesConfig config)
{
if (type.IgnoreSystemType() && config.ExportTypes.All(x => x.Name != type.Name))
return true;
if (config.IncludeTypes != null && !config.IncludeTypes.Contains(type.Name))
return true;
if (config.ExcludeTypes != null &&
config.ExcludeTypes.Any(x => type.Name == x || type.Name.StartsWith(x + "`")))
return true;
return false;
}
示例14: RemoveIgnoredTypesForNet
public static void RemoveIgnoredTypesForNet(this MetadataTypes metadata, MetadataTypesConfig config)
{
metadata.RemoveIgnoredTypes(config);
//Don't include Exported Types in System
metadata.Types.RemoveAll(x => x.IgnoreSystemType());
}
示例15: TypeScriptGenerator
public TypeScriptGenerator(MetadataTypesConfig config)
{
Config = config;
}