Beispiel #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));
    }
Beispiel #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));
    }
Beispiel #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));
    }