moolahservice.h

来自「C++ Source code from a tutorial」· C头文件 代码 · 共 58 行

H
58
字号
// MoolahService.h

#pragma once

#using <System.Web.Services.dll>

using namespace System;
using namespace System::Web;
using namespace System::Web::Services;

namespace MoolahService
{
/* This is the original default code that I'm removing!
   I also changed MoolahService.cpp (the source for this class)
   and I changed MoolahService.asmx to reflect the new class 
   name, MoolahClass.

    public __gc 
        class Class1 : public WebService
    {
        
    public:
		// WEB SERVICE EXAMPLE
		// The HelloWorld() example service returns the string "Hello, World!".
		// To test this web service, ensure that the .asmx file in the deployment path is
		// set as your Debug HTTP URL, in project properties.
		// and press F5.

        [System::Web::Services::WebMethod] 
        String __gc* HelloWorld();

        // TODO: Add the methods of your Web Service here
       
    };
	And what follows is my new code!
*/
	//Namespace="http://ManagedMoolah/XmlWebServices/", 
	[WebServiceAttribute(
		Namespace="http://localhost/MoolahSolution/",
		Description=
		"An XML Web Service to determine my net worth.")]
    public __gc class MoolahClass : public WebService
    {
        
    public:
        [System::Web::Services::WebMethod(
		Description=
		"Returns net worth. Add donations to make me richer.")]
        int GetWorth(int donation);

        [System::Web::Services::WebMethod(
		Description=
		"Returns your debt to me.")]
        int GetYourDebt();

    };
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?