Exemple #1
0
        public SyncDatabase(FirebaseApp app, IFirebaseNetworkConnection connection)
        {
            _app = app;
            _root = new JObject();

            _connection = connection;
            _connection.Received += ConnectionOnReceived;
        }
Exemple #2
0
        internal Subscription(FirebaseApp app, IEnumerable<ISubscriptionFilter> filters)
        {
            _app = app;
            SubscriptionId = Guid.NewGuid();

            if (filters != null)
            {
                _filters.AddRange(filters);
            }
        }
Exemple #3
0
        private static void Main(string[] args)
        {
            var app = new FirebaseApp(new Uri("https://dazzling-fire-1575.firebaseio.com/"),
                "T7dtZlSSDnGFZkPVWGq9chNPZ6dJQyt4bQNl4udN");

            JobQueue<Job> queue = new JobQueue<Job>(app.Child("jobs/job"), job =>
            {
                Console.WriteLine("[{0}]: {1}", job.Priority, job.Description);
                return true;
            });

            var feederStart = new ParameterizedThreadStart(Feeder);
            Thread feeder = new Thread(feederStart);
            feeder.Start(queue);

            Console.ReadLine();
        }
 public SubscriptionDatabase(FirebaseApp app, SyncDatabase syncDb)
 {
     _app    = app;
     _syncDb = syncDb;
 }
Exemple #5
0
 public Form1()
 {
     InitializeComponent();
     _app = new FirebaseApp(new Uri("https://publicdata-weather.firebaseio.com/"));
 }
Exemple #6
0
        private void btnCreateToken_Click(object sender, EventArgs e)
        {

            var tokenGenerator = new Firebase.TokenGenerator(SECRET);
            var authPayload = new Dictionary<string, object>()
                {
                  { "uid", this.txtUserId.Text }, 
                  { "UserId", this.txtUserId.Text },
                  { "Role", "user" }
                };

            string token = tokenGenerator.CreateToken(authPayload, new Firebase.TokenOptions(expires: new DateTime(2016, 5, 1), debug: true));
            this.txtAuthToken.Text = token;


            FirebaseApp App = new FirebaseApp(new Uri(FBPATHPRIVATE), token);

        }
Exemple #7
0
 internal Firebase(FirebaseApp app, FirebasePath path)
 {
     _app  = app;
     _path = path;
 }
Exemple #8
0
 internal Firebase(FirebaseApp app, FirebasePath path)
 {
     _app = app;
     _path = path;
 }
 public SubscriptionDatabase(FirebaseApp app, SyncDatabase syncDb)
 {
     _app = app;
     _syncDb = syncDb;
 }