public SyncDatabase(FirebaseApp app, IFirebaseNetworkConnection connection) { _app = app; _root = new JObject(); _connection = connection; _connection.Received += ConnectionOnReceived; }
internal Subscription(FirebaseApp app, IEnumerable<ISubscriptionFilter> filters) { _app = app; SubscriptionId = Guid.NewGuid(); if (filters != null) { _filters.AddRange(filters); } }
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; }
public Form1() { InitializeComponent(); _app = new FirebaseApp(new Uri("https://publicdata-weather.firebaseio.com/")); }
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); }
internal Firebase(FirebaseApp app, FirebasePath path) { _app = app; _path = path; }