private async void Init(string storage)
        {
            if (_inited || _initing)
            {
                return;
            }

            _initing = true;
            var status = await FirebaseDependencies.CheckAndFixDependencies();

            switch (status)
            {
            case DependencyStatus.Available:
            {
                _storage = storage.IsNullOrEmpty()? FirebaseStorage.DefaultInstance : FirebaseStorage.GetInstance(storage);
                _initing = false;
                _inited  = true;
                break;
            }

            default:
            {
                _initing = false;
                _inited  = false;
                break;
            }
            }
        }
示例#2
0
        private async void Init()
        {
            if (_inited || _initing)
            {
                return;
            }

            _initing = true;
            var status = await FirebaseDependencies.CheckAndFixDependencies();

            switch (status)
            {
            case DependencyStatus.Available:
            {
                _auth    = FirebaseAuth.DefaultInstance;
                _initing = false;
                _inited  = true;
                break;
            }

            default:
            {
                _initing = false;
                _inited  = false;
                break;
            }
            }
        }