public static void SetLinkedServiceProperties(LinkedService linkedService, LinkedServiceJson linkedServiceJson) { if (linkedService.LinkedServiceProperties != null) { LinkedServiceProperty linkedServiceProperty = linkedService.LinkedServiceProperties; LinkedServicePropertyJson linkedServicePropertyJson = new(); linkedServicePropertyJson.Type = linkedService.Type.ToString(); SetLinkedServiceTypeProperties(linkedServiceProperty, linkedServicePropertyJson); linkedServiceJson.Properties = linkedServicePropertyJson; } }
public static void SetLinkedServiceTypeProperties(LinkedServiceProperty linkedServiceProperty, LinkedServicePropertyJson linkedServicePropertyJson) { if (linkedServiceProperty.LinkedServiceTypeProperties != null) { LinkedServiceTypeProperty linkedServiceTypeProperty = linkedServiceProperty.LinkedServiceTypeProperties; LinkedServiceTypePropertyJson linkedServiceTypePropertyJson = new(); linkedServiceTypePropertyJson.Url = linkedServiceTypeProperty.Url?.UrlValue; linkedServiceTypePropertyJson.EnableServerCertificateValidation = linkedServiceTypeProperty.EnableServerCertificateValidation?.EnableServerCertificateValidationValue; linkedServiceTypePropertyJson.AuthenticationType = linkedServiceTypeProperty.AuthenticationType?.AuthenticationTypeValue.ToString(); linkedServiceTypePropertyJson.ConnectionString = linkedServiceTypeProperty.ConnectionString?.ConnectionStringValue; linkedServiceTypePropertyJson.UserName = linkedServiceTypeProperty.UserName?.UserNameValue; linkedServiceTypePropertyJson.FunctionAppUrl = linkedServiceTypeProperty.FunctionAppUrl?.Url; linkedServiceTypePropertyJson.EncryptedCredential = linkedServiceTypeProperty.EncryptedCredential?.EncryptedCredentialValue; linkedServicePropertyJson.TypeProperties = linkedServiceTypePropertyJson; } }