CopyDataSourceSpecification.SourceEnvironment Property
CopyDataSourceSpecification.SourceEnvironment Property
Indicates which MapPoint Web Service environment (LocationDataEnvironment enumeration) the data will be copied from. The default is LocationDataEnvironment.Staging.
Public SourceEnvironment As [Namespace].LocationDataEnvironment
[C#]
public [Namespace].LocationDataEnvironment SourceEnvironment;
Example
[Visual Basic]
'Copy data from Staging to Service
Dim copySpec As New CopyDataSourceSpecification
copySpec.DataSourceName = myDataSourceName
copySpec.SourceEnvironment = LocationDataEnvironment.Staging
copySpec.TargetEnvironment = LocationDataEnvironment.Service
jobID = DataService.CopyDataSource(copySpec)
'Wait for copy to complete
Do While (jobState = jobState.Pending OrElse jobState = jobState.InProcess)
Thread.Sleep(10000)
jobState = DataService.GetJobState(jobID)
Loop
[C#]
CopyDataSourceSpecification copySpec = new CopyDataSourceSpecification();
copySpec.DataSourceName = myDataSourceName;
copySpec.SourceEnvironment = LocationDataEnvironment.Staging;
copySpec.TargetEnvironment = LocationDataEnvironment.Service;
jobID = DataService.CopyDataSource(copySpec);
// Wait for copy to complete
do
{
Thread.Sleep(10000);
jobState = DataService.GetJobState(jobID);
}
while (jobState == JobState.Pending || jobState == JobState.InProcess)