Permalink
Browse files

moving repo

  • Loading branch information...
1 parent ba43e8a commit fdf3e388bb346389b1d57d28f79ec03fc0d8e7f0 geremy committed Mar 21, 2013
Showing with 2 additions and 10,100 deletions.
  1. +0 −209 csharp-iis/README
  2. +2 −0 csharp-iis/README.md
  3. +0 −16 csharp-iis/examples/HistoryExample.aspx
  4. +0 −40 csharp-iis/examples/HistoryExample.aspx.cs
  5. +0 −26 csharp-iis/examples/HistoryExample.aspx.designer.cs
  6. +0 −16 csharp-iis/examples/PublishExample.aspx
  7. +0 −114 csharp-iis/examples/PublishExample.aspx.cs
  8. +0 −26 csharp-iis/examples/PublishExample.aspx.designer.cs
  9. +0 −94 csharp-iis/examples/PubnubTest.aspx
  10. +0 −185 csharp-iis/examples/PubnubTest.aspx.cs
  11. +0 −114 csharp-iis/examples/PubnubTest.aspx.designer.cs
  12. +0 −16 csharp-iis/examples/SubscribeExample.aspx
  13. +0 −65 csharp-iis/examples/SubscribeExample.aspx.cs
  14. +0 −26 csharp-iis/examples/SubscribeExample.aspx.designer.cs
  15. +0 −16 csharp-iis/examples/TimeExample.aspx
  16. +0 −27 csharp-iis/examples/TimeExample.aspx.cs
  17. +0 −26 csharp-iis/examples/TimeExample.aspx.designer.cs
  18. +0 −16 csharp-iis/examples/UUIDExample.aspx
  19. +0 −27 csharp-iis/examples/UUIDExample.aspx.cs
  20. +0 −26 csharp-iis/examples/UUIDExample.aspx.designer.cs
  21. +0 −16 csharp-iis/examples/UnsubscribeExample.aspx
  22. +0 −76 csharp-iis/examples/UnsubscribeExample.aspx.cs
  23. +0 −26 csharp-iis/examples/UnsubscribeExample.aspx.designer.cs
  24. BIN csharp-iis/resource/Newtonsoft.Json.dll
  25. +0 −7,583 csharp-iis/resource/Newtonsoft.Json.xml
  26. +0 −704 csharp-iis/src/Pubnub.cs
  27. +0 −178 csharp-iis/src/PubnubCrypto.cs
  28. +0 −16 csharp-iis/test/unit-test.aspx
  29. +0 −390 csharp-iis/test/unit-test.aspx.cs
  30. +0 −26 csharp-iis/test/unit-test.aspx.designer.cs
View
@@ -1,209 +0,0 @@
-## ---------------------------------------------------
-##
-## YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
-## http://www.pubnub.com/account
-##
-## ----------------------------------------------------
-
-## -------------------------------------------------
-## PubNub 3.1 Real-time Cloud Push API - C#-IIS
-## -------------------------------------------------
-##
-## PubNub is a Massively Scalable Real-time Service for Web and Mobile Games.
-## This is a cloud-based service for broadcasting Real-time messages
-## to thousands of web and mobile clients simultaneously.
-
-## This tutorial is based on .Net Framework 4.0 (Visual Studio 2010)
-## and this application is tested on IIS 7.
-
-===============================================================================
-TUTORIAL: HOW TO USE
-===============================================================================
-
-## Create a new web application
-
-## Add reference of Newtonsoft.Json.dll from applications root\resource directory.
-
-## To use this API include Pubnub.cs, PubnubCrypto.cs files from applications root\src
-## directory to your project and use functions from there as follows.
-
-## --------------------------------------------------------------------------------
-## C#-IIS : (Init)
-## ---------------
-
- //set the channel
- string channel = "hello-world";
-
- // Initialize pubnub state
- pubnub objPubnub = new pubnub(
- "demo", // PUBLISH_KEY
- "demo", // SUBSCRIBE_KEY
- "demo", // SECRET_KEY
- "", // CIPHER_KEY (Cipher key is Optional)
- false // SSL_ON?
- );
-
-## --------------------------------------------------------------------------------
-## C#-IIS : (Publish)
-## ------------------
-
- List<object> info = null;
- Dictionary<string, object> args = new Dictionary<string, object>();
- // Publish string message
- args.Add("channel", channel);
- args.Add("message", "Hello Csharp - IIS");
- info = objPubnub.Publish(args);
- // Print response
- Debug.WriteLine("Published messages - >");
- Debug.WriteLine("[ " + info[0].ToString() + ", " + info[1] + ", " + info[2] + "]");
-
- // Publish message in array format
- args = new Dictionary<string, object>();
- JArray jarr = new JArray();
- jarr.Add("Sunday");
- jarr.Add("Monday");
- jarr.Add("Tuesday");
- jarr.Add("Wednesday");
- jarr.Add("Thursday");
- jarr.Add("Friday");
- jarr.Add("Saturday");
-
- args.Add("channel", channel);
- args.Add("message", jarr);
- info = objPubnub.Publish(args);
- // Print response
- Debug.WriteLine("[ " + info[0].ToString() + ", " + info[1] + ", " + info[2] + "]");
-
- // Publish message in object (key - val) format
- args = new Dictionary<string, object>();
- JObject jObj = new JObject();
- jObj.Add("Name", "John");
- jObj.Add("age", "25");
-
- args.Add("channel", channel);
- args.Add("message", jObj);
- info = objPubnub.Publish(args);
- // Print response
- Debug.WriteLine("[" + info[0].ToString() + ", " + info[1] + ", " + info[2] + "]");
-## ------------------------------------------------------------------------------------
-## C#-IIS : (Subscribe)
-## --------------------
- // Subscribe to channel
- pubnub.Procedure Receiver = delegate(object message)
- {
- Debug.WriteLine("[Subscribed data] - " + message);
- return true;
- };
- pubnub.Procedure ConnectCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- return true;
- };
- pubnub.Procedure DisconnectCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- return true;
- };
- pubnub.Procedure ReconnectCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- return true;
- };
- pubnub.Procedure ErrorCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- return true;
- };
-
- Dictionary<string, object> args = new Dictionary<string, object>();
- args.Add("channel", channel);
- args.Add("callback", Receiver); // callback to get response
- args.Add("connect_cb", ConnectCallback); // callback to get connect event
- args.Add("disconnect_cb", DisconnectCallback); // callback to get disconnect event
- args.Add("reconnect_cb", ReconnectCallback); // callback to get reconnect event
- args.Add("error_cb", ErrorCallback); // callback to get error event
-
- // Subscribe
- objPubnub.Subscribe(args);
-
-## --------------------------------------------------------------------------------
-## C#-IIS : (History)
-## ------------------
- //Get the history of messages
-
- Dictionary<string, string> args = new Dictionary<string, string>();
- args.Add("channel", channel);
- args.Add("limit", 3.ToString());
- List<object> history = objPubnub.History(args);
- Debug.WriteLine("History messages - > ");
- foreach (object history_message in history)
- {
- Debug.WriteLine(history_message);
- }
-
-
-## --------------------------------------------------------------------------------
-## C#-IIS : (Time)
-## ---------------
- //Get the time
- Debug.WriteLine("Server Time - > " + objPubnub.Time());
-
-## --------------------------------------------------------------------------------
-## C#-IIS : (UUID)
-## ---------------
- // Get UUID
- Debug.WriteLine("Generated UUID - > " + objPubnub.UUID());
-
-## ------------------------------------------------------------------------------------
-## C#-IIS : (Unsubscribe)
-## ----------------------
- // Unsubscribe to channel
- pubnub.Procedure Receiver = delegate(object message)
- {
- Debug.WriteLine("[Subscribed data] - " + message);
- Dictionary<string, object> arg = new Dictionary<string, object>();
- arg.Add("channel", channel);
- //Unsubscribe messages
- objPubnub.Unsubscribe(arg);
- return true;
- };
- pubnub.Procedure ConnectCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- // Publish String Message
- Dictionary<string, object> publish = new Dictionary<string, object>();
- publish.Add("channel", channel);
- publish.Add("message", "Hello World!!!!");
-
- // publish Response
- objPubnub.Publish(publish);
- return true;
- };
- pubnub.Procedure DisconnectCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- return true;
- };
- pubnub.Procedure ReconnectCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- return true;
- };
- pubnub.Procedure ErrorCallback = delegate(object message)
- {
- Debug.WriteLine(message);
- return true;
- };
-
- Dictionary<string, object> args = new Dictionary<string, object>();
- args.Add("channel", channel);
- args.Add("callback", Receiver); // callback to get response
- args.Add("connect_cb", ConnectCallback); // callback to get connect event
- args.Add("disconnect_cb", DisconnectCallback); // callback to get disconnect event
- args.Add("reconnect_cb", ReconnectCallback); // callback to get reconnect event
- args.Add("error_cb", ErrorCallback); // callback to get error event
-
- // Subscribe
- objPubnub.Subscribe(args);
-
-=====================================================================================
View
@@ -0,0 +1,2 @@
+##The latest PubNub for C# files can be found at:
+https://github.com/pubnub/c-sharp
@@ -1,16 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HistoryExample.aspx.cs" Inherits="csharp_webApp.HistoryExample" %>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head runat="server">
- <title></title>
-</head>
-<body>
- <form id="form1" runat="server">
- <div>
-
- </div>
- </form>
-</body>
-</html>
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Diagnostics;
-
-namespace csharp_webApp
-{
- public partial class HistoryExample : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- // channel name
- string channel = "test-iis";
-
- // Initialize pubnub state
- pubnub objPubnub = new pubnub(
- "demo", // PUBLISH_KEY
- "demo", // SUBSCRIBE_KEY
- "demo", // SECRET_KEY
- "", // CIPHER_KEY (Cipher key is Optional)
- false // SSL_ON?
- );
-
- // History
- Dictionary<string, string> args = new Dictionary<string, string>();
- args.Add("channel", channel);
- args.Add("limit", 3.ToString());
- List<object> history = objPubnub.History(args);
- Debug.WriteLine("");
- Debug.WriteLine("History messages - > ");
- foreach (object history_message in history)
- {
- Debug.WriteLine(history_message);
- }
- }
- }
-}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,16 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PublishExample.aspx.cs" Inherits="csharp_webApp.PublishExample" %>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head runat="server">
- <title></title>
-</head>
-<body>
- <form id="form1" runat="server">
- <div>
-
- </div>
- </form>
-</body>
-</html>
Oops, something went wrong.

0 comments on commit fdf3e38

Please sign in to comment.