internal Dataset(
            ICredentialProvider <UnitySocialCredential> credentialProvider,
            string identityId,
            bool isAnonymousUser,
            string name,
            LocalStorage local,
            IRemoteStorage remote)
        {
            _identityId         = identityId;
            _isAnonymousUser    = isAnonymousUser;
            _name               = name;
            _local              = local;
            _remote             = remote;
            _credentialProvider = credentialProvider;

            _credentialProvider.onIdentityChanged += OnIdentityChanged;
            NetworkReachabilityMonitor.OnNetworkReachabilityChanged += OnNetworkReachabilityChanged;

            _logger = Logger.GetLogger(GetType());
        }
        public LocalStorage()
        {
            _directoryPath = Application.persistentDataPath;

            var filePath = Path.Combine(_directoryPath, DbFileName);

            _filePath = "URI=file:" + filePath;

            if (!Directory.Exists(_directoryPath))
            {
                Directory.CreateDirectory(_directoryPath);
            }

            if (!File.Exists(filePath))
            {
                SqliteConnection.CreateFile(filePath);
            }

            _logger = Logger.GetLogger(GetType());

            SetupDatabase();
        }
Exemple #3
0
 public CloudSaveClient(ICredentialProvider <UnitySocialCredential> credentialProvider)
 {
     _credentialProvider = credentialProvider;
     _logger             = Logger.GetLogger(GetType());
 }