Beispiel #1
0
        Settings(
            string deviceId,
            string targetModuleId,
            TransportType transportType,
            TimeSpan directMethodFrequency,
            Option <Uri> reportingEndpointUrl,
            InvocationSource invocationSource,
            Option <string> serviceClientConnectionString,
            string moduleId,
            TimeSpan testDuration,
            TimeSpan testStartDelay,
            Option <string> directMethodName,
            Option <string> trackingId,
            Option <string> directMethodResultType)
        {
            Preconditions.CheckRange(testDuration.Ticks, 0);
            Preconditions.CheckRange(testStartDelay.Ticks, 0);

            this.DeviceId       = Preconditions.CheckNonWhiteSpace(deviceId, nameof(deviceId));
            this.TargetModuleId = Preconditions.CheckNonWhiteSpace(targetModuleId, nameof(targetModuleId));
            Preconditions.CheckArgument(TransportType.IsDefined(typeof(TransportType), transportType));
            this.TransportType                 = transportType;
            this.DirectMethodFrequency         = directMethodFrequency;
            this.InvocationSource              = invocationSource;
            this.ReportingEndpointUrl          = reportingEndpointUrl;
            this.ServiceClientConnectionString = serviceClientConnectionString;
            this.ModuleId               = Preconditions.CheckNonWhiteSpace(moduleId, nameof(moduleId));
            this.TestDuration           = testDuration;
            this.TestStartDelay         = testStartDelay;
            this.DirectMethodName       = directMethodName.GetOrElse("HelloWorldMethod");
            this.TrackingId             = trackingId;
            this.DirectMethodResultType = (DirectMethodResultType)Enum.Parse(typeof(DirectMethodResultType), directMethodResultType.GetOrElse("LegacyDirectMethodTestResult"));
        }
Beispiel #2
0
        Settings(
            string deviceId,
            string targetModuleId,
            TransportType transportType,
            TimeSpan directMethodDelay,
            Option <Uri> analyzerUrl,
            InvocationSource invocationSource,
            Option <string> serviceClientConnectionString,
            string moduleId,
            TimeSpan testDuration,
            TimeSpan testStartDelay,
            Option <Uri> testResultCoordinatorUrl,
            Option <string> trackingId)
        {
            Preconditions.CheckRange(testDuration.Ticks, 0);
            Preconditions.CheckRange(testStartDelay.Ticks, 0);

            this.DeviceId       = Preconditions.CheckNonWhiteSpace(deviceId, nameof(deviceId));
            this.TargetModuleId = Preconditions.CheckNonWhiteSpace(targetModuleId, nameof(targetModuleId));
            Preconditions.CheckArgument(TransportType.IsDefined(typeof(TransportType), transportType));
            this.TransportType                 = transportType;
            this.DirectMethodDelay             = directMethodDelay;
            this.InvocationSource              = invocationSource;
            this.AnalyzerUrl                   = analyzerUrl;
            this.ServiceClientConnectionString = serviceClientConnectionString;
            this.ModuleId                 = Preconditions.CheckNonWhiteSpace(moduleId, nameof(moduleId));
            this.TestDuration             = testDuration;
            this.TestStartDelay           = testStartDelay;
            this.TestResultCoordinatorUrl = testResultCoordinatorUrl;
            this.TrackingId               = trackingId;
        }
Beispiel #3
0
 Settings(
     string deviceId,
     string targetModuleId,
     TransportType transportType,
     TimeSpan directMethodDelay,
     Uri analyzerUrl)
 {
     this.DeviceId       = Preconditions.CheckNonWhiteSpace(deviceId, nameof(deviceId));
     this.TargetModuleId = Preconditions.CheckNonWhiteSpace(targetModuleId, nameof(targetModuleId));
     Preconditions.CheckArgument(TransportType.IsDefined(typeof(TransportType), transportType));
     this.TransportType     = transportType;
     this.DirectMethodDelay = Preconditions.CheckNotNull(directMethodDelay);
     this.AnalyzerUrl       = Preconditions.CheckNotNull(analyzerUrl);
 }