C# Class Google.Apis.NuGet.Publisher.NuGetApiPublisher

This publisher publishes Google API packages to NuGet main repository.
Datei anzeigen Open project: Gainedge/BetterExplorer Class Usage Examples

Public Methods

Method Description
NuGetApiPublisher ( DiscoveryItem item ) : System

Constructs a new logic item.

Run ( ) : System.Threading.Tasks.Task

This is the main logic, which does the following: Download the API's bundle from "https://google-api-client-libraries.appspot.com/" Extract the API's sources Build the sources Create a NuGet package Publish the package to NuGet main repository

Leave the NuGetApiKey empty to avoid publishing to NuGet main repository

Test ( string directory ) : System.Threading.Tasks.Task

Tests the main logic and does the following: Build the source files which specified in the input directory Create a local NuGet package

Private Methods

Method Description
Build ( string sourceFolder ) : Task

Builds the source folder. First it copies all the sources into the template folder and then build the project file.

CreateLocalNupkgFile ( string buildDirectoryPath ) : string

Creates a local nupkg file.

DownloadBundle ( ) : Task

Downloads the API's bundle.

ExtractSources ( string zipFile ) : string

Extracts the sources. This method first extracts the bundle and then checks by the source zip if a NuGet package already exists for the specific API version. If not, the method extracts also the source zip to the returned folder path.

Method Details

NuGetApiPublisher() public method

Constructs a new logic item.
public NuGetApiPublisher ( DiscoveryItem item ) : System
item Google.Apis.NuGet.Publisher.Discovery.DiscoveryItem
return System

Run() public method

This is the main logic, which does the following: Download the API's bundle from "https://google-api-client-libraries.appspot.com/" Extract the API's sources Build the sources Create a NuGet package Publish the package to NuGet main repository
Leave the NuGetApiKey empty to avoid publishing to NuGet main repository
public Run ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

Test() public method

Tests the main logic and does the following: Build the source files which specified in the input directory Create a local NuGet package
public Test ( string directory ) : System.Threading.Tasks.Task
directory string
return System.Threading.Tasks.Task