Clone Method (BigQueryConnection)
Creates a new object that is a copy of the current instance.
This example shows how to clone a
BigQueryConnection. To make sure all the properties are inherited, one of them (UserId) is written to the console.
|
|---|
public void CloneAConnection()
{
BigQueryConnection bigQueryConnection = new BigQueryConnection(
@"Authentication Type=ServiceAccount;ServiceAccount Json=C:\keys\service-account.json;Project Id=your_project;DataSet Id=your_dataset;License Key=**********");
BigQueryConnection bigQueryConnection2 = (BigQueryConnection)bigQueryConnection.Clone();
Console.WriteLine(bigQueryConnection2.UserId);
} |
|
|---|
Public Sub CloneAConnection()
Dim bigQueryConnection As New BigQueryConnection( _
"Authentication Type=ServiceAccount;ServiceAccount Json=C:\keys\service-account.json;Project Id=your_project;DataSet Id=your_dataset;License Key=**********")
Dim bigQueryConnection2 As BigQueryConnection = CType(bigQueryConnection.Clone(), BigQueryConnection)
Console.WriteLine(bigQueryConnection2.UserId)
End Sub |