/// <summary> /// Configure OCS/OMF Services /// </summary> private static IOmfIngressService ConfigureOcsOmf(Uri address, string tenantId, string namespaceId, string clientId, string clientSecret) { var deviceAuthenticationHandler = new AuthenticationHandler(address, clientId, clientSecret); var deviceBaseOmfIngressService = new OmfIngressService(address, null, HttpCompressionMethod.None, deviceAuthenticationHandler); return(deviceBaseOmfIngressService.GetOmfIngressService(tenantId, namespaceId)); }
public Device(string address, string tenantId, string namespaceId, string clientId, string clientSecret) { // Create the AuthenticationHandler and IngressSerice to use to send data AuthenticationHandler deviceAuthenticationHandler = new AuthenticationHandler(new Uri(address), clientId, clientSecret); OmfIngressService deviceBaseOmfIngressService = new OmfIngressService(new Uri(address), null, HttpCompressionMethod.None, deviceAuthenticationHandler); _deviceOmfIngressService = deviceBaseOmfIngressService.GetOmfIngressService(tenantId, namespaceId); }
public OmfIngressClient(string address, string tenantId, string namespaceId, string clientId, string clientSecret) { // Get Ingress Services to communicate with server and handle ingress management AuthenticationHandler authenticationHandler = new AuthenticationHandler(new Uri(address), clientId, clientSecret); _tenantId = tenantId; _namespaceId = namespaceId; OmfIngressService baseOmfIngressService = new OmfIngressService(new Uri(address), null, HttpCompressionMethod.None, authenticationHandler); _omfIngressService = baseOmfIngressService.GetOmfIngressService(tenantId, namespaceId); }