public sealed class SourceContext : IMessage<SourceContext>, IMessage, IEquatable<SourceContext>, IDeepCloneable<SourceContext>
A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory.
Implements
IMessage<SourceContext>, IMessage, IEquatable<SourceContext>, IDeepCloneable<SourceContext>Namespace
Google.Cloud.DevTools.Source.V1Assembly
Google.Cloud.DevTools.Common.dll
Constructors
SourceContext()
public SourceContext()
SourceContext(SourceContext)
public SourceContext(SourceContext other)
Parameter | |
---|---|
Name | Description |
other | SourceContext |
Fields
GitRevisionIdLogLabel
public const string GitRevisionIdLogLabel = "git_revision_id"
Gets the custom log label of Stackdriver Logging entry to set Git revision id. When writing a Stackdriver Logging entry, the user should add this custom label, with a value of the git revision id for the source code. This enables Google Cloud Tools for Visual Studio to locate the source file revision of the log entry.
Field Value | |
---|---|
Type | Description |
String |
Properties
AppSourceContext
public static SourceContext AppSourceContext { get; }
Gets the SourceContext for the application.
Property Value | |
---|---|
Type | Description |
SourceContext |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException | The source context file is valid JSON, but is not valid as a SourceContext. |
InvalidJsonException | The source context file is not valid JSON. |
SecurityException | The application does not have permission to read the file. |
UnauthorizedAccessException | The application is not authorized to access the file. |
CloudRepo
public CloudRepoSourceContext CloudRepo { get; set; }
A SourceContext referring to a revision in a cloud repo.
Property Value | |
---|---|
Type | Description |
CloudRepoSourceContext |
CloudWorkspace
public CloudWorkspaceSourceContext CloudWorkspace { get; set; }
A SourceContext referring to a snapshot in a cloud workspace.
Property Value | |
---|---|
Type | Description |
CloudWorkspaceSourceContext |
ContextCase
public SourceContext.ContextOneofCase ContextCase { get; }
Property Value | |
---|---|
Type | Description |
SourceContext.ContextOneofCase |
Gerrit
public GerritSourceContext Gerrit { get; set; }
A SourceContext referring to a Gerrit project.
Property Value | |
---|---|
Type | Description |
GerritSourceContext |
Git
public GitSourceContext Git { get; set; }
A SourceContext referring to any third party Git repo (e.g. GitHub).
Property Value | |
---|---|
Type | Description |
GitSourceContext |