예제 #1
0
    public static AssemblyEntry Create(IAssemblySymbol assembly)
    {
        var identity                = assembly.Identity;
        var platformSupportEntry    = PlatformSupportEntry.Create(assembly.Modules.First()) ?? PlatformSupportEntry.Create(assembly);
        var previewRequirementEntry = PreviewRequirementEntry.Create(assembly.Modules.First()) ?? PreviewRequirementEntry.Create(assembly);
        var apis = GetApis(assembly);

        return(new AssemblyEntry(identity, platformSupportEntry, previewRequirementEntry, apis));
    }
예제 #2
0
    public static ApiEntry Create(ISymbol symbol, ApiEntry parent = null)
    {
        var guid                    = symbol.GetCatalogGuid();
        var kind                    = symbol.GetApiKind();
        var name                    = symbol.GetCatalogName();
        var syntax                  = symbol.GetCatalogSyntaxMarkup();
        var obsoletionEntry         = ObsoletionEntry.Create(symbol);
        var platformSupportEntry    = PlatformSupportEntry.Create(symbol);
        var previewRequirementEntry = PreviewRequirementEntry.Create(symbol);

        return(new ApiEntry(guid, kind, parent, name, syntax, obsoletionEntry, platformSupportEntry, previewRequirementEntry));
    }
예제 #3
0
    public static ApiEntry Create(ISymbol symbol, ApiEntry?parent = null)
    {
        ArgumentNullException.ThrowIfNull(symbol);

        var guid                    = symbol.GetCatalogGuid();
        var kind                    = symbol.GetApiKind();
        var name                    = symbol.GetCatalogName();
        var obsoletionEntry         = ObsoletionEntry.Create(symbol);
        var platformSupportEntry    = PlatformSupportEntry.Create(symbol);
        var previewRequirementEntry = PreviewRequirementEntry.Create(symbol);

        return(new ApiEntry(guid, kind, parent, name, null, obsoletionEntry, platformSupportEntry, previewRequirementEntry));
    }