2 |
3 |
@Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/Chapter20/Ch20Ex02/Ch20Ex02/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using Microsoft.AspNetCore.Components.Web.Virtualization
7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http
8 | @using Microsoft.JSInterop
9 | @using Ch20Ex02
10 | @using Ch20Ex02.Shared
11 |
--------------------------------------------------------------------------------
/Chapter20/Ch20Ex03/Ch20Ex03/Service1.svc:
--------------------------------------------------------------------------------
1 | <%@ ServiceHost Language="C#" Debug="true" Service="Ch20Ex03.Service1" CodeBehind="Service1.svc.cs" %>
--------------------------------------------------------------------------------
/Chapter20/Ch20Ex03Client/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Ch20Ex03Client.ServiceReference1;
7 |
8 | namespace Ch20Ex03Client
9 | {
10 | class Program
11 | {
12 | static void Main(string[] args)
13 | {
14 | int intParam;
15 | do
16 | {
17 | Console.WriteLine("Enter an integer and press enter to call the WCF service.");
18 | } while (!int.TryParse(Console.ReadLine(), out intParam));
19 | Service1Client client = new Service1Client();
20 | Console.WriteLine(client.GetData(intParam));
21 | Console.WriteLine("Press an key to exit.");
22 | Console.ReadKey();
23 | }
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/Chapter20/Ch20Ex04/Ch20Ex04/GameService.svc:
--------------------------------------------------------------------------------
1 | <%@ ServiceHost Language="C#" Debug="true" Service="Ch20Ex04.GameService" CodeBehind="GameService.svc.cs" %>
2 |
--------------------------------------------------------------------------------
/Chapter20/Ch20Ex04Client/App.config:
--------------------------------------------------------------------------------
1 |
2 |