ParseClient contains static functions that handle global configuration for the Parse library.
        private ParseClient GetClient()
        {
            string appId = ConfigurationManager.AppSettings["parseApplicationId"];
            string restApiKey = ConfigurationManager.AppSettings["parseRestApiKey"];
            string masterKey = ConfigurationManager.AppSettings["parseMasterKey"];

            var client = new ParseClient(appId, restApiKey, masterKey);
            return client;
        }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            label2.Text = cate;
            parseEngine = new ParseClient("fHKruOIrAtqIDOOOWHMUrvhk0dOwjplFOCjdL6CL", "93zxFQDtpRxaw6Y9moOyegqKqTTU8N3GBe42Je9n");

            server = new Server(port);
            Server.content = "";
            server.start();

            timer = new System.Timers.Timer(1000 * 60 * 20);
            timer.Elapsed +=
            new System.Timers.ElapsedEventHandler(theout);
            //到达时间的时候执行事件;
            timer.AutoReset = true;
            //设置是执行一次(false)还是一直执行(true);
            timer.Enabled = true;

            work();
        }
        public void Initialize()
        {
            if (isInitialized)
            {
                return;
            }

            isInitialized = true;
            // Keep this gameObject around, even when the scene changes.
            GameObject.DontDestroyOnLoad(gameObject);

            ParseClient.Initialize(new ParseClient.Configuration {
                ApplicationId = applicationID,
                WindowsKey    = dotnetKey,
                Server        = string.IsNullOrEmpty(server) ? null : server
            });

            Dispatcher.Instance.GameObject = gameObject;

            // Kick off the dispatcher.
            StartCoroutine(Dispatcher.Instance.DispatcherCoroutine);
        }
예제 #4
0
 /// <summary>
 /// Gets a value for the key of a particular type.
 /// </summary>
 /// <typeparam name="T">The type to convert the value to. Supported types are
 /// ParseObject and its descendents, Parse types such as ParseRelation and ParseGeopoint,
 /// primitive types,IList&lt;T&gt;, IDictionary&lt;string, T&gt; and strings.</typeparam>
 /// <param name="key">The key of the element to get.</param>
 /// <exception cref="System.Collections.Generic.KeyNotFoundException">The property is retrieved
 /// and <paramref name="key"/> is not found.</exception>
 /// <exception cref="System.FormatException">The property under this <paramref name="key"/>
 /// key was found, but of a different type.</exception>
 public T Get <T>(string key)
 {
     return((T)ParseClient.ConvertTo <T>(this.properties[key]));
 }
 private void Save()
 {
     Settings.Default.ApplicationSettings = ParseClient.SerializeJsonString(data);
     Settings.Default.Save();
 }
// Obj-C type -> .NET type is impossible to do flawlessly (especially
// on NSNumber). We can't transform NSDictionary into string because of this reason.
#if !IOS
        internal ParsePushNotificationEventArgs(string stringPayload)
        {
            StringPayload = stringPayload;

            Payload = ParseClient.DeserializeJsonString(stringPayload);
        }
 Program()
 {
     myClient = new Parse.ParseClient("APPID", "RESTAPIKEY", "MASTERKEY"); //change
 }