Class ApiMetadata (4.0.0)

 public sealed class ApiMetadata 

Provides metadata about an API. This is expected to be constructed with a single instance per API; equality is by simple identity.

Inheritance

Object > ApiMetadata

Namespace

Google.Api.Gax.Grpc

Assembly

Google.Api.Gax.Grpc.dll

Constructors

 public ApiMetadata(string name, IEnumerable<FileDescriptor> descriptors) 

Creates an API descriptor from a sequence of file descriptors.

Parameters
Name
Description
name
String

The name of the API. Must not be null or empty.

descriptors
IEnumerable < FileDescriptor >

The protobuf descriptors of the API. Must not be null.

Remarks

The sequence is evaluated once, on construction.

 public ApiMetadata(string name, Func<IEnumerable<FileDescriptor>> descriptorsProvider) 

Creates an API descriptor which lazily requests the protobuf descriptors when ProtobufDescriptors is first called.

Parameters
Name
Description
name
String

The name of the API. Must not be null or empty.

descriptorsProvider
Func < IEnumerable < FileDescriptor >>

A provider function for the protobuf descriptors of the API. Must not be null, and must not return a null value. This will only be called once by this API descriptor, when first requested.

Properties

 public string Name { get; } 

The name of the API (typically the fully-qualified name of the client library package). This is never null or empty.

Property Value
Type
Description
 public IReadOnlyList<FileDescriptor> ProtobufDescriptors { get; } 

The protobuf descriptors used by this API.

Property Value
Type
Description
IReadOnlyList < FileDescriptor >
 public TypeRegistry TypeRegistry { get; } 

A type registry containing all the types in ProtobufDescriptors .

Property Value
Type
Description
TypeRegistry
Create a Mobile Website
View Site in Mobile | Classic
Share by: