Exemplo n.º 1
0
 /// <summary>Snippet for CreateContext</summary>
 public void CreateContextResourceNames()
 {
     // Snippet: CreateContext(SessionName, Context, CallSettings)
     // Create client
     ContextsClient contextsClient = ContextsClient.Create();
     // Initialize request argument(s)
     SessionName parent  = SessionName.FromProjectSession("[PROJECT]", "[SESSION]");
     Context     context = new Context();
     // Make the request
     Context response = contextsClient.CreateContext(parent, context);
     // End snippet
 }
Exemplo n.º 2
0
 /// <summary>Snippet for CreateContext</summary>
 public void CreateContext()
 {
     // Snippet: CreateContext(string, Context, CallSettings)
     // Create client
     ContextsClient contextsClient = ContextsClient.Create();
     // Initialize request argument(s)
     string  parent  = "projects/[PROJECT]/agent/sessions/[SESSION]";
     Context context = new Context();
     // Make the request
     Context response = contextsClient.CreateContext(parent, context);
     // End snippet
 }
Exemplo n.º 3
0
 /// <summary>Snippet for CreateContext</summary>
 public void CreateContextRequestObject()
 {
     // Snippet: CreateContext(CreateContextRequest, CallSettings)
     // Create client
     ContextsClient contextsClient = ContextsClient.Create();
     // Initialize request argument(s)
     CreateContextRequest request = new CreateContextRequest
     {
         ParentAsSessionName = SessionName.FromProjectSession("[PROJECT]", "[SESSION]"),
         Context             = new Context(),
     };
     // Make the request
     Context response = contextsClient.CreateContext(request);
     // End snippet
 }
Exemplo n.º 4
0
 /// <summary>Snippet for CreateContext</summary>
 public void CreateContextRequestObject()
 {
     // Snippet: CreateContext(CreateContextRequest, CallSettings)
     // Create client
     ContextsClient contextsClient = ContextsClient.Create();
     // Initialize request argument(s)
     CreateContextRequest request = new CreateContextRequest
     {
         Parent  = "",
         Context = new Context(),
     };
     // Make the request
     Context response = contextsClient.CreateContext(request);
     // End snippet
 }