• 大小: 0.47M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-02-24
  • 语言: C#
  • 标签: 架构  REST  SOA  

资源简介

它基于HTTP协议,是一种明确构建在客户端/服务端体系结构上的一种风格。特征如下:
1、网络上的资源都被抽象为资源,这些资源都具有唯一的统一资源标识符
(URI:Uniform Resource Identiter),这些资源都是自我们描述的。这些资源使用HTTP内容标头类型指定。如:XML、JSON、HTML、PNG等。
2、服务的使用者通过HTTP协议的标准动作(Get、Put、Post、Delete)通过统一的接口对资源进行操作。
3、对资源进行的操作不会改变它的URI。
4、客户端、服务端之间的交互是没有状态的。由于这种无状态行,服务端不需要为每个客户端维护Context

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.ServiceModel;
using SOAContracts;

namespace ClientConsole
{
class Program
{
static void Main()
{
Console.WriteLine(“调用SOA 服务....“);
InvoleSOAService();
Console.WriteLine();
Console.WriteLine(“调用REST服务....“);
InvokeRESTService();
Console.ReadLine();
}

static  void InvoleSOAService()
{
using (ChannelFactory factory = new ChannelFactory(“SOAService“))
{
                try
                {
                    ILog log = factory.CreateChannel();
                    List listAll = log.GetAll();
                    Console.WriteLine(string.Format(“SOA Service中 GetAll 方法获取到日志记录有{0}条“ listAll.Count));
                    Console.WriteLine();
                    const string year = “2011“;
                    const string month = “10“;
                    List list = log.GetMonthLog(year month)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      83410  2019-05-07 15:31  WCFstyle\.vs\config\applicationhost.config

    ..A..H.    153088  2019-05-07 16:32  WCFstyle\.vs\WCFstyle\v15\.suo

     文件          0  2019-05-07 15:17  WCFstyle\.vs\WCFstyle\v15\Server\sqlite3\db.lock

     文件       4096  2019-05-07 15:17  WCFstyle\.vs\WCFstyle\v15\Server\sqlite3\storage.ide

     文件      32768  2019-05-07 15:30  WCFstyle\.vs\WCFstyle\v15\Server\sqlite3\storage.ide-shm

     文件    3922272  2019-05-07 16:32  WCFstyle\.vs\WCFstyle\v15\Server\sqlite3\storage.ide-wal

     文件        376  2019-05-07 15:32  WCFstyle\ClientConsole\App.config

     文件       6656  2019-05-07 16:20  WCFstyle\ClientConsole\bin\Debug\ClientConsole.exe

     文件        376  2019-05-07 15:32  WCFstyle\ClientConsole\bin\Debug\ClientConsole.exe.config

     文件      13824  2019-05-07 16:20  WCFstyle\ClientConsole\bin\Debug\ClientConsole.pdb

     文件      14328  2011-10-27 17:09  WCFstyle\ClientConsole\bin\Debug\ClientConsole.vshost.exe

     文件        292  2011-10-27 16:33  WCFstyle\ClientConsole\bin\Debug\ClientConsole.vshost.exe.config

     文件        490  2007-07-21 01:33  WCFstyle\ClientConsole\bin\Debug\ClientConsole.vshost.exe.manifest

     文件       5632  2019-05-07 16:12  WCFstyle\ClientConsole\bin\Debug\SOAContracts.dll

     文件      11776  2019-05-07 16:12  WCFstyle\ClientConsole\bin\Debug\SOAContracts.pdb

     文件       3274  2019-05-07 15:32  WCFstyle\ClientConsole\ClientConsole.csproj

     文件          0  2019-05-07 16:20  WCFstyle\ClientConsole\obj\Debug\ClientConsole.csproj.CopyComplete

     文件         42  2019-05-07 16:20  WCFstyle\ClientConsole\obj\Debug\ClientConsole.csproj.CoreCompileInputs.cache

     文件       2080  2019-05-07 16:20  WCFstyle\ClientConsole\obj\Debug\ClientConsole.csproj.FileListAbsolute.txt

     文件      26966  2019-05-07 16:20  WCFstyle\ClientConsole\obj\Debug\ClientConsole.csprojAssemblyReference.cache

     文件       6656  2019-05-07 16:20  WCFstyle\ClientConsole\obj\Debug\ClientConsole.exe

     文件      13824  2019-05-07 16:20  WCFstyle\ClientConsole\obj\Debug\ClientConsole.pdb

     文件       6638  2019-05-07 15:41  WCFstyle\ClientConsole\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2019-05-07 15:32  WCFstyle\ClientConsole\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2019-05-07 15:32  WCFstyle\ClientConsole\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2019-05-07 15:32  WCFstyle\ClientConsole\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       2066  2019-05-07 16:21  WCFstyle\ClientConsole\Program.cs

     文件       1370  2011-10-27 16:01  WCFstyle\ClientConsole\Properties\AssemblyInfo.cs

     文件       5632  2019-05-07 16:12  WCFstyle\RESTContracts\bin\Debug\RESTContracts.dll

     文件      11776  2019-05-07 16:12  WCFstyle\RESTContracts\bin\Debug\RESTContracts.pdb

............此处省略172个文件信息

评论

共有 条评论