private static DistributionPlan CreateNewDistributionPlan(
            DatasetActivationProposal proposal,
            IDatasetOfflineInformation offlineInfo,
            SystemDiagnostics systemDiagnostics)
        {
            var plan = new DistributionPlan(
                (p, t, r) => Task <DatasetOnlineInformation> .Factory.StartNew(
                    () => new DatasetOnlineInformation(
                        new DatasetId(),
                        new EndpointId("id"),
                        new NetworkIdentifier("machine"),
                        new Mock <ISendCommandsToRemoteEndpoints>().Object,
                        new Mock <INotifyOfRemoteEndpointEvents>().Object,
                        systemDiagnostics),
                    t,
                    TaskCreationOptions.None,
                    new CurrentThreadTaskScheduler()),
                offlineInfo,
                NetworkIdentifier.ForLocalMachine(),
                proposal);

            return(plan);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Machine"/> class for the local machine.
 /// </summary>
 public Machine()
     : this(NetworkIdentifier.ForLocalMachine(), HardwareSpecification.ForLocalMachine())
 {
 }