internal PnPComponent(IPnPDeviceClient client, string compName, ILogger log) { this.isRootComponent = string.IsNullOrEmpty(compName); this.componentName = compName; this.client = client; this.logger = log; this.logger.LogInformation("New PnPComponent for " + compName); }
public static async Task <PnPClient> CreateFromDPSSasAndModelIdAsync(string scopeId, string deviceId, string sas, string modelId, ILogger logger) { var dc = await ProvisionDeviceWithSasKeyAsync(scopeId, deviceId, sas, modelId, logger); deviceClient = new PnPDeviceClient(dc); await deviceClient.SetDesiredPropertyUpdateCallbackAsync(DesiredPropertyUpdateCallback, deviceClient); return(instance); }
public static PnPClient CreateFromConnectionStringAndModelId(string connectionString, string modelId) { deviceClient = new PnPDeviceClient(DeviceClient.CreateFromConnectionString(connectionString, TransportType.Mqtt, new ClientOptions() { ModelId = modelId })); deviceClient.SetDesiredPropertyUpdateCallbackAsync(DesiredPropertyUpdateCallback, deviceClient); return(instance); }
public static PnPClient CreateFromDeviceClient(IPnPDeviceClient client) { deviceClient = client; deviceClient.SetDesiredPropertyUpdateCallbackAsync(DesiredPropertyUpdateCallback, deviceClient); return(instance); }
public PnPDeviceClient(IPnPDeviceClient mockClient) { this.mockClient = mockClient; }
internal PnPComponent(IPnPDeviceClient client, ILogger logger) : this(client, string.Empty, logger) { }