Inheritance: IParseObject
Ejemplo n.º 1
0
 protected async void SaveAsync()
 {
     ParseObject gameScore = new ParseObject("GameScore");
     gameScore["score"] = 1337;
     gameScore["playerName"] = "Sean Plott";
     await gameScore.SaveAsync();                    
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     ParseObject testObj = new ParseObject("TestObject");
     testObj["foo"] = "bar";
     Debug.Log(testObj.ToString());
     testObj.SaveAsync();
 }
        private async void cambiarMiInfo(object sender, RoutedEventArgs e)
        {
            Esperar1.Visibility = Visibility.Visible;
            try
            {
                var trata = new ParseObject("User");
                trata.ObjectId = usu.Id;
                trata["Nombre"] = nombre.Text;
                trata["Apellido"] = apellido.Text;
                trata["email"] = correo.Text;
                trata["telefono"] = int.Parse(telefono.Text);
                trata["cedula"] = cedula.Text;
                trata["username"] = username.Text;
                trata["password"] = password.Password;

                usu.Nombre = nombre.Text;
                usu.Apellido = apellido.Text;
                usu.Correo = correo.Text;
                usu.Telefono = uint.Parse(telefono.Text);
                usu.Cedula = cedula.Text;
                usu.Username = username.Text;
                usu.Password = password.Password;

                await trata.SaveAsync();
                Esperar1.Visibility = Visibility.Collapsed;
            }
            catch (Exception ex)
            {
                Esperar1.Visibility = Visibility.Collapsed;
                var dialog = new Windows.UI.Popups.MessageDialog("Tu información no ha podido ser editada");
                dialog.Commands.Add(new Windows.UI.Popups.UICommand("OK") { });
                var result = await dialog.ShowAsync();
            }
        }
Ejemplo n.º 4
0
    public IEnumerator Test()
    {
        int number = 43;
        string str = "the number is " + number;
        DateTime date = DateTime.Now;
        IList<object> list = new List<object> { str, number };
        IDictionary<string, object> dictionary = new Dictionary<string, object>
        {
            { "number", number },
            { "string", str }
        };

        var bigObject = new ParseObject("BigObject");
        bigObject["myNumber"] = number;
        bigObject["myString"] = str;
        bigObject["myDate"] = date;
        bigObject["myList"] = list;
        bigObject["myDictionary"] = dictionary;
        Task task = bigObject.SaveAsync();

        while(!task.IsCompleted) { Debug.Log("Saving"); yield return null; }

        {
            if(task.IsFaulted || task.IsCanceled)
            {
                Debug.Log("Failed: " + task.Exception.ToString());
            }
            else
            {
                Debug.Log("Succeeded");
            }
        }

        Debug.Log("Saved");
    }
Ejemplo n.º 5
0
	public static void SendScore(int score)
	{
		
		ParseObject testObject = new ParseObject("Score");
		testObject["foo"] = "bar";
		testObject.SaveAsync();
	}
Ejemplo n.º 6
0
 public static void ForgetParseObject(ParseObject parseObject)
 {
     if (LocalParseObjects!=null && parseObject!=null)
     {
         LocalParseObjects.Remove(parseObject.ObjectId);
     }
 }
Ejemplo n.º 7
0
 public static void addScore(string user_name, int score)
 {
     ParseObject po = new ParseObject("Leaderboard");
     po["user_name"] = user_name;
     po["score"] = score;
     po.SaveAsync();
 }
Ejemplo n.º 8
0
	void SaveHighScore(string score)
	{
		ParseObject gameScore = new ParseObject("GameScore");
		gameScore["score"] = score;
		gameScore["playerName"] = ParseUser.CurrentUser.Username;
		gameScore.SaveAsync();
	}
Ejemplo n.º 9
0
        public async void SaveEvent(object sender, RoutedEventArgs e) 
        {
                try { 
                if(Activity.Text=="")
                {
                    InvalidInput();
                    return;
                }

                Info data = new Info()
                {
                    UserId = (++App.i).ToString(),
                    Activity = Activity.Text.Trim(),
                    Lat = pin.Location.Position.Latitude,
                    Long = pin.Location.Position.Longitude,
                    Interested = 1
            };
                var DataBase = new ParseObject("Activities");
                DataBase["UserID"] = data.UserId.ToString();
                DataBase["Interested"] = data.Interested;
                DataBase["Activity"] = data.Activity;
                DataBase["Location"] = new ParseGeoPoint(data.Lat, data.Long);
                await DataBase.SaveAsync();
                Frame.Navigate(typeof(Nearby));
            }
            catch(Exception ex)
            {
                Message.Text = ex.Message;
            }


        }
Ejemplo n.º 10
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.Login);
            // Create your application here
            ParseClient.Initialize ("Da2XGAo55e6dqM0IayIY6WWwf4TcP9TWaWG9j3yg", "KJeICBYidEkTHOXeiR9gIC15hYm2hP04YomzJarv");
            editText1 = FindViewById<EditText> (Resource.Id.editText1);
            editText2 = FindViewById<EditText> (Resource.Id.editText2);
            button1 = FindViewById<Button> (Resource.Id.button1);
            ss =  Convert.ToString(editText1.Text);

            button1.Click += async delegate {
                int i = 1;
                string sname = string.Concat("shop", i.ToString());
                ParseObject s1 = new ParseObject(sname);
                s1["product_id"] = null;
                s1["product_name"] = null;
                s1["product_mrp"] = null;
                s1["product_availability"] = null;

                    await s1.SaveAsync();
                StartActivity(typeof(addProductsActivity));
                i = i + 1;

                Toast toast = Toast.MakeText(this, "Logged In", ToastLength.Long);
                toast.Show();
                StartActivity(typeof(addProductsActivity));
            };
        }
Ejemplo n.º 11
0
		static async Task FixRunSet (ParseObject runSet)
		{
			var runs = await ParseInterface.PageQueryWithRetry (() => {
				return ParseObject.GetQuery ("Run")
					.Include ("benchmark")
					.WhereEqualTo ("runSet", runSet);
			});
			var benchmarkNames = runs.Select (r => (string) (((ParseObject)r ["benchmark"]) ["name"])).Distinct ();
			Console.WriteLine ("run set {0} has {1} runs {2} benchmarks", runSet.ObjectId, runs.Count (), benchmarkNames.Count ());
			var averages = new Dictionary <string, double> ();
			var variances = new Dictionary <string, double> ();
			foreach (var name in benchmarkNames) {
				var numbers = runs.Where (r => (string)(((ParseObject)r ["benchmark"]) ["name"]) == name).Select (r => ParseInterface.NumberAsDouble (r ["elapsedMilliseconds"])).ToArray ();
				var avg = numbers.Average ();
				averages [name] = avg;
				var sum = 0.0;
				foreach (var v in numbers) {
					var diff = v - avg;
					sum += diff * diff;
				}
				var variance = sum / numbers.Length;
				variances [name] = variance;
				Console.WriteLine ("benchmark {0} average {1} variance {2}", name, avg, variance);
			}
			runSet ["elapsedTimeAverages"] = averages;
			runSet ["elapsedTimeVariances"] = variances;
			await runSet.SaveAsync ();
		}
		ParseObject ToParseObject(ChatRoomUser cru)
		{
			var po = new ParseObject ("ChatRoomUser");
			po ["userId"] = cru.userID;
			po ["chatroomId"] = cru.chatRoomID;
			return po;
		}
Ejemplo n.º 13
0
    public void attemptSignUp()
    {
        username = nameField.GetComponent<InputField> ().text;
        password = passField.GetComponent<InputField> ().text;

        if (username.Equals ("")) {
            setMessage("No empty usernames!");
            return;
        }
        if (username.Length > maxUsernameLength || username.Length < minUsernameLength) {
            setMessage("Names must be " + minUsernameLength + "-" + maxUsernameLength + " letters!" );
            return;
        }

        ParseObject account = new ParseObject("Account");
        account ["username"] = username;
        account ["password"] = password;
        account.SaveAsync ();
        setMessage ("Success!");

        //K so once signed in, want to let them login.
        //should make signup disappear
        Vector3 sscale1 = signup.GetComponent<RectTransform> ().localScale;
        sscale1.x = 0;
        signup.GetComponent<RectTransform> ().localScale = sscale1;
        displayLogin ();
    }
Ejemplo n.º 14
0
 public void TestParseObjectConstructor() {
   ParseObject obj = new ParseObject("Corgi");
   Assert.AreEqual("Corgi", obj.ClassName);
   Assert.Null(obj.CreatedAt);
   Assert.True(obj.IsDataAvailable);
   Assert.True(obj.IsDirty);
 }
 IEnumerator loadImage(Image imageComponent, ParseObject news)
 {
     Sprite image = template;
     ParseFile imageObject = news.Get<ParseFile>("image");
     string path = Application.persistentDataPath + "/" + news.ObjectId + FILENAME_NEWS_PIC;
     bool updateExistingPic = false;
     if (File.Exists(path))
     {
         updateExistingPic = DateTime.Compare(File.GetLastWriteTime(path), news.UpdatedAt.Value.AddHours(1)) < 0;
     }
     if (imageObject != null)
     {
         if ((File.Exists(path))&&!updateExistingPic)
         {
             var fileData = File.ReadAllBytes(path);
             var tex = new Texture2D(2, 2);
             tex.LoadImage(fileData);
             image = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f));
         }
         else
         {
             var pictureRequest = new WWW(imageObject.Url.AbsoluteUri);
             yield return pictureRequest;
             byte[] fileBytes = pictureRequest.texture.EncodeToJPG(25);
             File.WriteAllBytes(path, fileBytes);
             image = Sprite.Create(pictureRequest.texture, new Rect(0, 0, pictureRequest.texture.width, pictureRequest.texture.height), new Vector2(0.5f, 0.5f));
         }
     }
     imageComponent.overrideSprite = image;
 }
Ejemplo n.º 16
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
					
			SetContentView (Resource.Layout.alta_contacto);

			btnGuardar = FindViewById<Button> (Resource.Id.btnGuardar);
			txtNombre = FindViewById<EditText> (Resource.Id.txtNombre);
			txtTelefono = FindViewById<EditText> (Resource.Id.txtTelefono);


			btnGuardar.Click += delegate {
				ParseObject contactos = new ParseObject("MisContactos");
				contactos["nombre"] =txtNombre.Text;
				contactos["telefono"] = txtTelefono.Text;
				contactos.SaveAsync ();
				txtNombre.Text="";
				txtTelefono.Text="";

				Toast.MakeText (this, "Se registro nuevo contacto", ToastLength.Long).Show();

			};



		}
Ejemplo n.º 17
0
        public async void UploadtoParse()
        {

            ParseClient.Initialize("oVFGM355Btjc1oETUvhz7AjvNbVJZXFD523abVig", "4FpFCQyO7YVmo2kMgrlymgDsshAvTnGAtQcy9NHl");

            var filePicker = new FileOpenPicker();
            filePicker.FileTypeFilter.Add(".png");
            var pickedfile = await filePicker.PickSingleFileAsync();
            using (var randomStream = (await pickedfile.OpenReadAsync()))
            {
                using (var stream = randomStream.AsStream())
                {
                    //byte[] data = System.Text.Encoding.UTF8.GetBytes("Working at Parse is great!");
                    ParseFile file = new ParseFile("resume1.png", stream);

                    await file.SaveAsync();

                    var jobApplication = new ParseObject("JobApplication");
                    jobApplication["applicantName"] = "jambor";
                    jobApplication["applicantResumeFile"] = file;
                    await jobApplication.SaveAsync();

                }
            }

          

        }
 public async Task StoreNetworkAsync(INeuralNetwork network, double eval)
 {
     var networkParseFormat = new ParseObject(_networkVersion);
     networkParseFormat["jsonNetwork"] = JsonConvert.SerializeObject(network.GetGenes());
     networkParseFormat["eval"] = eval;
     await networkParseFormat.SaveAsync();
 }
Ejemplo n.º 19
0
		public async void pp(){
			ParseObject products = new ParseObject("products");
			products ["product_id"] = product_id;
			products ["product_name"] = product_name;
			products ["product_mrp"] = product_mrp;
			await products.SaveAsync();
		}
Ejemplo n.º 20
0
 public void ClaimCurrentScore(string name)
 {
     ParseObject playerScore = new ParseObject("playerScore");
     playerScore ["playerName"] = name;
     playerScore ["score"] = currentTopScore;
     playerScore.SaveAsync ();
 }
Ejemplo n.º 21
0
		async public void SaveToParse ()
		{
			ParseObject catalog;
			if (this.ParseId == null || this.ParseId == "") {
				catalog = new ParseObject ("Catalogo");
			} else {
				ParseQuery<ParseObject> query = ParseObject.GetQuery ("Catalogo");
				catalog = await query.GetAsync (this.ParseId);
			}

			IList<string> movies = new List<string> ();
			MoviexCatalogDB moviexCatalogDB = new MoviexCatalogDB ();
			foreach (MoviexCatalog moviexCatalog in moviexCatalogDB.All ().Where (mxc => mxc.IdCatalog.Equals (this.Id))) {
				moviexCatalog.SaveToParse ();
				movies.Add (moviexCatalog.ParseId);
			}

			if (this.User != null) {
				catalog ["Usuario"] = this.User.ParseId;
			}
			catalog ["Peliculas"] = movies;

			await catalog.SaveAsync ().ContinueWith (t => {
				this.ParseId = catalog.ObjectId;
				Console.WriteLine("Saved Catalog in Parse: " + this.ParseId);
				CatalogDB catalogDB = new CatalogDB ();
				catalogDB.Update (this);
			});
		}
        public void Cadastrar()
        {
            DateTime? _datetime = time_abre.Value;
            string hr_abre = _datetime.Value.Hour + ":" + _datetime.Value.Minute;

            _datetime = time_fecha.Value;
            string hr_fecha = _datetime.Value.Hour + ":" + _datetime.Value.Minute;

            ListPickerItem selectedItem = (ListPickerItem)lst_segmento.SelectedItem;
            string segmento_lst = (string)selectedItem.Content;

            if((txt_foodtruck_nome.Text != "")||(segmento_lst != "")||(hr_abre != "")||(hr_fecha != "")||(txt_preco.Text != "")||(txt_telefone.Text != ""))
            {
                ParseObject cadastro = new ParseObject("Foodtruck");
                cadastro["idUser"] = Id;
                cadastro["Foodtruck_nome"] = txt_foodtruck_nome.Text;
                cadastro["Segmento"] = segmento_lst;
                cadastro["Hr_Abre"] = hr_abre;
                cadastro["Hr_Fecha"] = hr_fecha;
                cadastro["Preco"] = txt_preco.Text;
                cadastro["Telefone"] = txt_telefone.Text;
                cadastro["latitude"] = "0.0";
                cadastro["longitude"] = "0.0";
                cadastro.SaveAsync();

                MessageBoxResult cadastro_ok = MessageBox.Show("Dados cadastrado com sucesso!", "FoodTruck Show", MessageBoxButton.OK);
                if (cadastro_ok == MessageBoxResult.OK)
                    NavigationService.GoBack();
            }
            else
            {
                MessageBoxResult msn_erro = MessageBox.Show("Todos os campos devem ser preenchidos obrigatoriamente.", "Preencha todos os dados!", MessageBoxButton.OK);
            }
        }
Ejemplo n.º 23
0
		async public void SaveToParse ()
		{
			ParseObject checkin;
			if (this.ParseId == null || this.ParseId == "") {
				checkin = new ParseObject ("Checkin");
			} else {
				ParseQuery<ParseObject> query = ParseObject.GetQuery ("Checkin");
				checkin = await query.GetAsync (this.ParseId);
			}

			if (this.Movie != null) {
				checkin ["Pelicula"] = this.Movie.ParseId;
			}
			if (this.User != null) {
				checkin ["Usuario"] = this.User.ParseId;
			}
			checkin ["Coordenadas"] = new Parse.ParseGeoPoint (this.Latitude, this.Longitude);

			await checkin.SaveAsync ().ContinueWith (t => {
				this.ParseId = checkin.ObjectId;
				Console.WriteLine("Saved Checkin in Parse: " + this.ParseId);
				CheckinDB checkinDB = new CheckinDB ();
				checkinDB.Update (this);
			});
		}
Ejemplo n.º 24
0
 //    public string description;
 //    public int scoreToWin;
 //    public bool isCollectable = false;
 public void Initialize( ParseObject reward /*string name, string description*/ )
 {
     this.reward = reward;
     labelName.text = (string)reward["name"];
     labelScore.text = reward["goal"].ToString();
     //		this.description = description;
 }
Ejemplo n.º 25
0
	//public CNj
	//public BotControlScript botControllScript;
	
	// Use this for initialization
	void Start () {
		//init
		commandList = new ArrayList ();
		this.tcpListener = new TcpListener(IPAddress.Any, serverPort);
		this.listenThread = new Thread(new ThreadStart(ListenForClients));
		this.listenThread.Start();
		
		string localIP = LocalIPAddress ();
		
		Debug.Log ("Server Start on:"+localIP);
		
		
		ParseObject testObject = new ParseObject("GlassGame");
		testObject["ip"] = localIP;
		testObject.SaveAsync().ContinueWith(temp=>
		                                    {
			
			var query = ParseObject.GetQuery("GlassGame").OrderByDescending("createdAt").Limit(1);
			query.FirstAsync().ContinueWith(t =>
			                                {
				ParseObject obj = t.Result;
				
				Debug.Log("Insert Parse ip:"+obj["ip"]);
				Debug.Log("Parse Date:"+obj.CreatedAt);
			});
			
		});
		
		
		
		
		
		
		
	}
Ejemplo n.º 26
0
        /// <summary>
        /// Returns a StarSystem instance
        /// </summary>
        /// <param name="parse"></param>
        /// <returns></returns>
        public static StarSystem Map(ParseObject parse)
        {
            var starSystem = new StarSystem();
            if (parse.Keys.Contains("ammoniaCount"))
                starSystem.AmmoniaCount = parse["ammoniaCount"] == null ? 0 : parse.Get<int>("ammoniaCount");
            if (parse.Keys.Contains("blackHoleCount"))
                starSystem.BlackHoleCount = parse["blackHoleCount"] == null ? 0 : parse.Get<int>("blackHoleCount");
            if (parse.Keys.Contains("counter"))
                starSystem.Counter = parse["counter"] == null ? 0 : parse.Get<int>("counter");
            starSystem.CreatedAt = parse.CreatedAt.Value;
            if (parse.Keys.Contains("discovered"))
                starSystem.Discovered = parse.Get<bool>("discovered");
            if (parse.Keys.Contains("distanceRT"))
                starSystem.DistanceRunningTotal = parse["distanceRT"] == null ? 0 : parse.Get<double>("distanceRT");
            if (parse.Keys.Contains("distToNext"))
                starSystem.DistToNext = parse["distToNext"] == null ? 0 : parse.Get<double>("distToNext");
            if (parse.Keys.Contains("earthLikeCount"))
                starSystem.EarthLikeCount = parse["earthLikeCount"] == null ? 0 : parse.Get<int>("earthLikeCount");
            //ExpeditionId = parse.Get<string>("expedition"),
            if (parse.Keys.Contains("highMetalCount"))
                starSystem.HighMetalCount = parse["highMetalCount"] == null ? 0 : parse.Get<int>("highMetalCount");
            if (parse.Keys.Contains("icyPlanetCount"))
                starSystem.IcyPlanetCount = parse["icyPlanetCount"] == null ? 0 : parse.Get<int>("icyPlanetCount");
            if (parse.Keys.Contains("jovianCount"))
                starSystem.JovianCount = parse["jovianCount"] == null ? 0 : parse.Get<int>("jovianCount");
            if (parse.Keys.Contains("MetalRichCount"))
                starSystem.MetalRichCount = parse["MetalRichCount"] == null ? 0 : parse.Get<int>("MetalRichCount");
            if (parse.Keys.Contains("name"))
                starSystem.Name = parse.Get<string>("name");
            if (parse.Keys.Contains("neutronStarCount"))
                starSystem.NeutronStarCount = parse["neutronStarCount"] == null ? 0 : parse.Get<int>("neutronStarCount");
            if (parse.Keys.Contains("objectCount"))
                starSystem.ObjectCount = parse["objectCount"] == null ? 0 : parse.Get<int>("objectCount");

            starSystem.ObjectId = parse.ObjectId;
            if (parse.Keys.Contains("refuel"))
                starSystem.Refuled = parse.Get<bool>("refuel");
            if (parse.Keys.Contains("rockyCount"))
                starSystem.RockyCount = parse["rockyCount"] == null ? 0 : parse.Get<int>("rockyCount");
            if (parse.Keys.Contains("scanCount"))
                starSystem.ScanCount = parse["scanCount"] == null ? 0 : parse.Get<int>("scanCount");
            if (parse.Keys.Contains("scanCountRT"))
                starSystem.ScanCountRunningTotal = parse["scanCountRT"] == null ? 0 : parse.Get<double>("scanCountRT");
            if (parse.Keys.Contains("starCount"))
                starSystem.StarCount = parse["starCount"] == null ? 0 : parse.Get<int>("starCount");

            starSystem.UpdatedAt = parse.UpdatedAt.Value;
            if (parse.Keys.Contains("waterWorldCount"))
                starSystem.WaterWorldCount = parse["waterWorldCount"] == null ? 0 : parse.Get<int>("waterWorldCount");
            if (parse.Keys.Contains("whiteDwarfCount"))
                starSystem.WhiteDwarfCount = parse["whiteDwarfCount"] == null ? 0 : parse.Get<int>("whiteDwarfCount");
            if (parse.Keys.Contains("x"))
                starSystem.X = parse["x"] == null ? 0 : parse.Get<double>("x");
            if (parse.Keys.Contains("y"))
                starSystem.Y = parse["y"] == null ? 0 : parse.Get<double>("y");
            if (parse.Keys.Contains("z"))
                starSystem.Z = parse["z"] == null ? 0 : parse.Get<double>("z");
            return starSystem;
        }
Ejemplo n.º 27
0
 public async void ParseTest()
 {
     ParseClient.Initialize("oVFGM355Btjc1oETUvhz7AjvNbVJZXFD523abVig", "4FpFCQyO7YVmo2kMgrlymgDsshAvTnGAtQcy9NHl");
     ParseObject gameScore = new ParseObject("GameScore");
     gameScore["score"] = 1337;
     gameScore["playerName"] = "Sean Plott";
     await gameScore.SaveAsync();
 }
 public ParsePointer(ParseObject obj)
 {
     if (obj != null)
     {
         ObjectId = obj.objectId;
         ClassName = obj["Class"] as string;// GetClassName(obj.GetType());
     }
 }
Ejemplo n.º 29
0
 public ParseObject getParseObject()
 {
     ParseObject obj = new ParseObject("Holiday");
     obj["start"] = Updates.DateToString(mStart);
     obj["end"] = Updates.DateToString(mEnd);
     obj["name"] = mName;
     return obj;
 }
Ejemplo n.º 30
0
    // Use this for initialization
    void Start()
    {
        mytext = gameObject.GetComponent<TextMesh> ();

        ParseObject testObject = new ParseObject ("TestObject");
        testObject ["food"] = "bar";
        testObject.SaveAsync ();
    }
Ejemplo n.º 31
0
 public void UpdateObject(string id)
 {
     Parse.ParseObject po = new Parse.ParseObject("NewObject");
     po["objectId"] = id;
     po["name"]     = "NAME-UP";
     po["element"]  = "VALUE-UP";;
     myClient.UpdateObject(po);
 }
Ejemplo n.º 32
0
 public string CreateObject()
 {
     Parse.ParseObject po = new Parse.ParseObject("NewObject");
     po["name"]    = "NAME";
     po["element"] = "VALUE";;
     Parse.ParseObject myObject = myClient.CreateObject(po);
     return(myObject.objectId);
 }
Ejemplo n.º 33
0
 internal ParseRelation(ParseObject parent, string key) : base(parent, key)
 {
 }
Ejemplo n.º 34
0
 internal ParseRelationBase(ParseObject parent, string key)
 {
     EnsureParentAndKey(parent, key);
 }
Ejemplo n.º 35
0
 internal ParseRelationBase(ParseObject parent, string key, string targetClassName)
     : this(parent, key)
 {
     this.targetClassName = targetClassName;
 }
Ejemplo n.º 36
0
 /// <summary>
 /// Saves all of the ParseObjects in the enumeration. Equivalent to
 /// calling <see cref="ParseObject.SaveAllAsync{T}(IEnumerable{T})"/>.
 /// </summary>
 /// <param name="objects">The objects to save.</param>
 public static Task SaveAllAsync <T>(this IEnumerable <T> objects) where T : ParseObject
 {
     return(ParseObject.SaveAllAsync(objects));
 }
Ejemplo n.º 37
0
 /// <summary>
 /// Saves all of the ParseObjects in the enumeration. Equivalent to
 /// calling
 /// <see cref="ParseObject.SaveAllAsync{T}(IEnumerable{T}, CancellationToken)"/>.
 /// </summary>
 /// <param name="objects">The objects to save.</param>
 /// <param name="cancellationToken">The cancellation token.</param>
 public static Task SaveAllAsync <T>(
     this IEnumerable <T> objects, CancellationToken cancellationToken) where T : ParseObject
 {
     return(ParseObject.SaveAllAsync(objects, cancellationToken));
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Fetches all of the objects in the enumeration that don't already have
 /// data. Equivalent to calling
 /// <see cref="ParseObject.FetchAllIfNeededAsync{T}(IEnumerable{T})"/>.
 /// </summary>
 /// <param name="objects">The objects to fetch.</param>
 public static Task <IEnumerable <T> > FetchAllIfNeededAsync <T>(
     this IEnumerable <T> objects)
     where T : ParseObject
 {
     return(ParseObject.FetchAllIfNeededAsync(objects));
 }
Ejemplo n.º 39
0
 /// <summary>
 /// Fetches all of the objects in the enumeration that don't already have
 /// data. Equivalent to calling
 /// <see cref="ParseObject.FetchAllIfNeededAsync{T}(IEnumerable{T}, CancellationToken)"/>.
 /// </summary>
 /// <param name="objects">The objects to fetch.</param>
 /// <param name="cancellationToken">The cancellation token.</param>
 public static Task <IEnumerable <T> > FetchAllIfNeededAsync <T>(
     this IEnumerable <T> objects, CancellationToken cancellationToken)
     where T : ParseObject
 {
     return(ParseObject.FetchAllIfNeededAsync(objects, cancellationToken));
 }
Ejemplo n.º 40
0
 private static ParseRelation <T> CreateRelation <T>(ParseObject parent, string key, string targetClassName)
     where T : ParseObject
 {
     return(new ParseRelation <T>(parent, key, targetClassName));
 }
Ejemplo n.º 41
0
 internal ParseRelation(ParseObject parent, string key, string targetClassName)
     : base(parent, key, targetClassName)
 {
 }