📄 dataservice.asmx
字号:
<%@ WebService Language="C#" Class="SampleDataService" %>
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Web;
using System.Web.Caching;
using System.Web.Services;
using System.Web.Services.Protocols;
using Microsoft.Web.Services;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class SampleDataService : DataService {
static List<SampleRow> _data;
static int _nextId;
static object _dataLock = new object();
private static List<SampleRow> Data {
get {
if (_data == null) {
lock (_dataLock) {
if (_data == null) {
_data = new List<SampleRow>();
_data.Add(new SampleRow(0, "A. Datum Corporation",
"http://www.adatum.com"));
_data.Add(new SampleRow(1, "Adventure Works",
"http://www.adventure-works.com"));
_data.Add(new SampleRow(2, "Alpine Ski House",
"http://www.alpineskihouse.com"));
_data.Add(new SampleRow(3, "Baldwin Museum of Science
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -