Hi,
Another topic about how to make it work since the DB22.
I’m always en Xamarin forms, c#.
With the db21, I used to connect my replicator like that :
Uri target = new Uri($"blip://{_serverInfo.UrlServer}");
ReplicatorConfiguration replicationConfig = new ReplicatorConfiguration(_dataBaseGetter.Get(), target);
replicationConfig.Continuous = true;
replicationConfig.ReplicatorType = ReplicatorType.PushAndPull;
replicationConfig.Authenticator = new BasicAuthenticator(_serverInfo.Login, _serverInfo.Password);
_replicator = new Replicator(replicationConfig);
Sice the DB22, I can’t call the ReplicatorConfiguration with an URI, but an IEndPoint object.
So I search a little and do it like that with the DB22 :
Uri target = new Uri($"blip://{_serverInfo.UrlServer}");
IEndpoint endpoint = new URLEndpoint(target);
ReplicatorConfiguration replicationConfig = new ReplicatorConfiguration(_dataBaseGetter.Get(), endpoint)
{
Continuous = true,
ReplicatorType = ReplicatorType.PushAndPull,
Authenticator = new BasicAuthenticator(_serverInfo.Login, _serverInfo.Password)
};
_replicator = new Replicator(replicationConfig);
In the 2 cases, after creating my _replicator, I’m doing that :
if (CrossConnectivity.IsSupported && CrossConnectivity.Current.IsConnected)
_replicator.Start();
_token = _replicator.AddChangeListener(_replicator_StatusChanged);
But my replicator did not start anymore.
How to do it ?
Steeve