RunAsync() public method

public RunAsync ( string url ) : System.Threading.Tasks.Task
url string
return System.Threading.Tasks.Task
コード例 #1
0
ファイル: AppDelegate.cs プロジェクト: Redth/SignalR
		//
		// This method is invoked when the application has loaded and is ready to run. In this 
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
			window = new UIWindow(UIScreen.MainScreen.Bounds);

			var controller = new UIViewController();
			var view = new UIView (UIScreen.MainScreen.Bounds);
			view.BackgroundColor = UIColor.White;
			controller.View = view;

			controller.NavigationItem.Title = "SignalR Client";

			var textView = new UITextView(new RectangleF(0, 0, 320, view.Frame.Height - 0));
			view.AddSubview (textView);


			navController = new UINavigationController (controller);

			window.RootViewController = navController;
			window.MakeKeyAndVisible();

			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync("http://signalr-test1.cloudapp.net:82/");

			return true;
		}
コード例 #2
0
ファイル: AppDelegate.cs プロジェクト: Coladela/signalr-chat
		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
			window = new UIWindow(UIScreen.MainScreen.Bounds);

			var controller = new UIViewController();
			var view = new UIView (UIScreen.MainScreen.Bounds);
			view.BackgroundColor = UIColor.White;
			controller.View = view;

			controller.NavigationItem.Title = "SignalR Client";

			var textView = new UITextView(new CGRect(0, 0, 320, view.Frame.Height - 0));
			view.AddSubview (textView);


			navController = new UINavigationController (controller);

			window.RootViewController = navController;
			window.MakeKeyAndVisible();

			if (SIGNALR_DEMO_SERVER == "http://YOUR-SERVER-INSTANCE-HERE") {
				textView.Text = "You need to configure the app to point to your own SignalR Demo service.  Please see the Getting Started Guide for more information!";
				return true;
			}
			
			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync(SIGNALR_DEMO_SERVER);

			return true;
		}
コード例 #3
0
        public MainPage()
        {
            InitializeComponent();

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            client.RunAsync();
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: selzero/SignalR-Clients
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);
            client.RunAsync();

            Console.ReadLine();
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: GaneshBachhao/SignalR
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);
            client.RunAsync("http://localhost:40476/").Wait();

            Console.ReadKey();
        }
コード例 #6
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);

            client.RunAsync();

            Console.ReadLine();
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: starblade/SignalR-Clients
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);

            client.RunAsync("http://signalr-test1.cloudapp.net:81/");

            Console.ReadLine();
        }
コード例 #8
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);

            client.RunAsync("http://localhost:40476/").Wait();

            Console.ReadKey();
        }
コード例 #9
0
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.Main);
			var textView = FindViewById<TextView>(Resource.Id.textView);
			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync("http://signalr-test1.cloudapp.net:82/");
		}
コード例 #10
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            client.RunAsync();

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
コード例 #11
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            
            // Windows Phone emulator runs in a separate virtual machine therefore you can't use a url containing localhost
            var task = client.RunAsync("http://signalr01.cloudapp.net:81/");

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
コード例 #12
0
        public MainPage()
        {
            InitializeComponent();

            // http://msdn.microsoft.com/en-us/library/dd920295(v=vs.95).aspx
            // With Silverlight, you can specify whether the browser or the client provides HTTP handling for your Silverlight-based applications. 
            // By default, HTTP handling is performed by the browser and you must opt-in to client HTTP handling. 
            WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
            WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);

            var writer = new TextBoxWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            var task = client.RunAsync("http://localhost:40476/");
        }
コード例 #13
0
ファイル: MainActivity.cs プロジェクト: Coladela/signalr-chat
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.Main);
			var textView = FindViewById<TextView>(Resource.Id.textView);
			
			if (SIGNALR_DEMO_SERVER == "http://YOUR-SERVER-INSTANCE-HERE") {
				textView.Text = "You need to configure the app to point to your own SignalR Demo service.  Please see the Getting Started Guide for more information!";
				return;
			}
			
			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync(SIGNALR_DEMO_SERVER);
		}
コード例 #14
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            if (SIGNALR_DEMO_SERVER == "http://YOUR-SERVER-INSTANCE-HERE") {
                Messages2.Text = "You need to configure the app to point to your own SignalR Demo service.  Please see the Getting Started Guide for more information!";
                return;
            }
            

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            
            // Windows Phone emulator runs in a separate virtual machine therefore you can't use a url containing localhost
			var task = client.RunAsync(SIGNALR_DEMO_SERVER);

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
コード例 #15
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            var controller = new UIViewController();

            var label = new UILabel(new RectangleF(0, 0, 320, 30));
            label.Text = "SignalR Client";

            var textView = new UITextView(new RectangleF(0, 35, 320, 500));

            controller.Add(label);
            controller.Add(textView);

            window.RootViewController = controller;
            window.MakeKeyAndVisible();

            var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

            var client = new CommonClient(traceWriter);
            client.RunAsync();

            return true;
        }
コード例 #16
0
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.  The Parameter
 /// property is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     var writer = new TextBoxWriter(SynchronizationContext.Current, this.Messages);
     var client = new CommonClient(writer);
     client.RunAsync();
 }
コード例 #17
0
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.  The Parameter
 /// property is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     var writer = new TextBoxWriter(SynchronizationContext.Current, this.Messages);
     var client = new CommonClient(writer);
     var task = client.RunAsync("http://localhost:40476/");
 }