예제 #1
0
        private ExperimentDistributor createExperimentDistributor(IExperimentSeriesBuilder builder,
                                                                  Uri dockerHost,
                                                                  Version dockerRemoteApiVersion)
        {
            ExperimentDockerClient client = null;

            if (dockerRemoteApiVersion != null)
            {
                client = ExperimentDockerClient.create(dockerHost, dockerRemoteApiVersion);
            }
            else
            {
                client = ExperimentDockerClient.create(dockerHost);
            }
            return(ExperimentDistributor.create(client, builder));
        }
예제 #2
0
        private Investigator(Uri dockerHost, Version dockerRemoteApiVersion)
        {
            bool isOk = ((dockerHost != null) &&
                         (dockerHost.IsWellFormedOriginalString()));

            if (isOk)
            {
                this.obuilder    = ExperimentSeriesObjectBuilder.create();
                this.oparser     = ExperimentSeriesObjectParser.create(obuilder);
                this.jbuilder    = createExperimentSeriesJsonBuilder();
                this.jparser     = createExperimentSeriesJsonParser(obuilder);
                this.distributor = createExperimentDistributor(this.jbuilder,
                                                               dockerHost,
                                                               dockerRemoteApiVersion);
            }
            else
            {
                throw new ArgumentException("Argument 'dockerHost' must be not null " +
                                            "and a well-formed uri string.");
            }
        }