Ejemplo n.º 1
0
        public SyncDatabase(FirebaseApp app, IFirebaseNetworkConnection connection)
        {
            _app = app;
            _root = new JObject();

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

            if (filters != null)
            {
                _filters.AddRange(filters);
            }
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 4
0
 public SubscriptionDatabase(FirebaseApp app, SyncDatabase syncDb)
 {
     _app    = app;
     _syncDb = syncDb;
 }
Ejemplo n.º 5
0
 public Form1()
 {
     InitializeComponent();
     _app = new FirebaseApp(new Uri("https://publicdata-weather.firebaseio.com/"));
 }
Ejemplo n.º 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);

        }
Ejemplo n.º 7
0
 internal Firebase(FirebaseApp app, FirebasePath path)
 {
     _app  = app;
     _path = path;
 }
Ejemplo n.º 8
0
 internal Firebase(FirebaseApp app, FirebasePath path)
 {
     _app = app;
     _path = path;
 }
Ejemplo n.º 9
0
 public SubscriptionDatabase(FirebaseApp app, SyncDatabase syncDb)
 {
     _app = app;
     _syncDb = syncDb;
 }