[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSourceContext\u003c/code\u003e class in the Grafeas V1 API provides a reference to a tree of files, allowing identification of a unique file or directory revision.\u003c/p\u003e\n"],["\u003cp\u003eThis class has been implemented with methods to support IMessage, IEquatable, IDeepCloneable, and IBufferMessage and also inherits from the object class.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSourceContext\u003c/code\u003e class offers multiple constructors, including one that copies an existing \u003ccode\u003eSourceContext\u003c/code\u003e instance and another for a fresh instantiation, and it's located within the \u003ccode\u003eGrafeas.V1\u003c/code\u003e namespace in the \u003ccode\u003eGrafeas.V1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains properties such as \u003ccode\u003eCloudRepo\u003c/code\u003e, \u003ccode\u003eContextCase\u003c/code\u003e, \u003ccode\u003eGerrit\u003c/code\u003e, \u003ccode\u003eGit\u003c/code\u003e, and \u003ccode\u003eLabels\u003c/code\u003e, which provide further details about the source context and its associated metadata.\u003c/p\u003e\n"],["\u003cp\u003eThe Grafeas V1 API has multiple version of the \u003ccode\u003eSourceContext\u003c/code\u003e, the latest being 3.7.0, and going as far back as 2.2.0.\u003c/p\u003e\n"]]],[],null,["# Grafeas v1 API - Class SourceContext (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Grafeas.V1/latest/Grafeas.V1.SourceContext)\n- [3.8.0](/dotnet/docs/reference/Grafeas.V1/3.8.0/Grafeas.V1.SourceContext)\n- [3.7.0](/dotnet/docs/reference/Grafeas.V1/3.7.0/Grafeas.V1.SourceContext)\n- [3.6.0](/dotnet/docs/reference/Grafeas.V1/3.6.0/Grafeas.V1.SourceContext)\n- [3.5.0](/dotnet/docs/reference/Grafeas.V1/3.5.0/Grafeas.V1.SourceContext)\n- [3.4.0](/dotnet/docs/reference/Grafeas.V1/3.4.0/Grafeas.V1.SourceContext)\n- [3.3.0](/dotnet/docs/reference/Grafeas.V1/3.3.0/Grafeas.V1.SourceContext)\n- [3.2.0](/dotnet/docs/reference/Grafeas.V1/3.2.0/Grafeas.V1.SourceContext)\n- [3.1.0](/dotnet/docs/reference/Grafeas.V1/3.1.0/Grafeas.V1.SourceContext)\n- [3.0.0](/dotnet/docs/reference/Grafeas.V1/3.0.0/Grafeas.V1.SourceContext)\n- [2.4.0](/dotnet/docs/reference/Grafeas.V1/2.4.0/Grafeas.V1.SourceContext)\n- [2.3.0](/dotnet/docs/reference/Grafeas.V1/2.3.0/Grafeas.V1.SourceContext)\n- [2.2.0](/dotnet/docs/reference/Grafeas.V1/2.2.0/Grafeas.V1.SourceContext) \n\n public sealed class SourceContext : IMessage\u003cSourceContext\u003e, IEquatable\u003cSourceContext\u003e, IDeepCloneable\u003cSourceContext\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Grafeas v1 API class SourceContext.\n\nA SourceContext is a reference to a tree of files. A SourceContext together\nwith a path point to a unique revision of a single file or directory. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SourceContext \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SourceContext](/dotnet/docs/reference/Grafeas.V1/latest/Grafeas.V1.SourceContext), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SourceContext](/dotnet/docs/reference/Grafeas.V1/latest/Grafeas.V1.SourceContext), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SourceContext](/dotnet/docs/reference/Grafeas.V1/latest/Grafeas.V1.SourceContext), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Grafeas.V1](/dotnet/docs/reference/Grafeas.V1/latest/Grafeas.V1)\n\nAssembly\n--------\n\nGrafeas.V1.dll\n\nConstructors\n------------\n\n### SourceContext()\n\n public SourceContext()\n\n### SourceContext(SourceContext)\n\n public SourceContext(SourceContext other)\n\nProperties\n----------\n\n### CloudRepo\n\n public CloudRepoSourceContext CloudRepo { get; set; }\n\nA SourceContext referring to a revision in a Google Cloud Source Repo.\n\n### ContextCase\n\n public SourceContext.ContextOneofCase ContextCase { get; }\n\n### Gerrit\n\n public GerritSourceContext Gerrit { get; set; }\n\nA SourceContext referring to a Gerrit project.\n\n### Git\n\n public GitSourceContext Git { get; set; }\n\nA SourceContext referring to any third party Git repo (e.g., GitHub).\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nLabels with user defined metadata."]]