• 大小: 78KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-21
  • 语言: Java
  • 标签: java接口  

资源简介

C#调用Java接口演示

资源截图

代码片段和文件信息

/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using System.Runtime.Serialization;
using Thrift.Protocol;
using Thrift.Transport;

namespace ConsoleApplication3
{
  public partial class Cloud {
    public interface Iface {
      string call(string ptsig string apiName string apiArgs);
      #if SILVERLIGHT
      IAsyncResult Begin_call(AsyncCallback callback object state string ptsig string apiName string apiArgs);
      string End_call(IAsyncResult asyncResult);
      #endif
    }

    public class Client : IDisposable Iface {
      public Client(TProtocol prot) : this(prot prot)
      {
      }

      public Client(TProtocol iprot TProtocol oprot)
      {
        iprot_ = iprot;
        oprot_ = oprot;
      }

      protected TProtocol iprot_;
      protected TProtocol oprot_;
      protected int seqid_;

      public TProtocol InputProtocol
      {
        get { return iprot_; }
      }
      public TProtocol OutputProtocol
      {
        get { return oprot_; }
      }


      #region “ IDisposable Support “
      private bool _IsDisposed;

      // IDisposable
      public void Dispose()
      {
        Dispose(true);
      }
      

      protected virtual void Dispose(bool disposing)
      {
        if (!_IsDisposed)
        {
          if (disposing)
          {
            if (iprot_ != null)
            {
              ((IDisposable)iprot_).Dispose();
            }
            if (oprot_ != null)
            {
              ((IDisposable)oprot_).Dispose();
            }
          }
        }
        _IsDisposed = true;
      }
      #endregion


      
      #if SILVERLIGHT
      public IAsyncResult Begin_call(AsyncCallback callback object state string ptsig string apiName string apiArgs)
      {
        return send_call(callback state ptsig apiName apiArgs);
      }

      public string End_call(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_call();
      }

      #endif

      public string call(string ptsig string apiName string apiArgs)
      {
        #if !SILVERLIGHT
        send_call(ptsig apiName apiArgs);
        return recv_call();

        #else
        var asyncResult = Begin_call(null null ptsig apiName apiArgs);
        return End_call(asyncResult);

        #endif
      }
      #if SILVERLIGHT
      public IAsyncResult send_call(AsyncCallback callback object state string ptsig string apiName string apiArgs)
      #else
      public void send_call(string ptsig string apiName string apiArgs)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage(“call“ TMessageType.Call seq

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

     文件        187  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\App.config

     文件      12288  2016-07-19 17:44  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.exe

     文件        187  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.exe.config

     文件      28160  2016-07-19 17:44  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.pdb

     文件      22984  2016-07-19 17:44  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.vshost.exe

     文件        187  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.vshost.exe.config

     文件        490  2010-03-17 22:39  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.vshost.exe.manifest

     文件      67584  2016-07-19 15:34  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug\Thrift.dll

     文件      12344  2016-07-19 16:31  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\Cloud.cs

     文件       2737  2016-07-19 16:01  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj

     文件        227  2016-07-19 16:01  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj.user

     文件        630  2016-07-19 17:44  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\ConsoleApplication3.csproj.FileListAbsolute.txt

     文件      12288  2016-07-19 17:44  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\ConsoleApplication3.exe

     文件      28160  2016-07-19 17:44  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\ConsoleApplication3.pdb

     文件       6699  2016-07-19 15:58  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       3009  2016-07-19 17:44  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\Program.cs

     文件       1358  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\Properties\AssemblyInfo.cs

     文件        947  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3.sln

    ..A..H.     24064  2016-07-19 16:53  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3.v11.suo

     目录          0  2016-07-19 15:37  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug\TempPE

     目录          0  2016-07-19 17:45  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin\Debug

     目录          0  2016-07-19 17:45  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj\Debug

     目录          0  2016-07-19 17:45  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\bin

     目录          0  2016-07-19 17:45  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\obj

     目录          0  2016-07-19 17:45  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3\Properties

     目录          0  2016-07-19 17:45  C#调用Java接口演示(郭)\ConsoleApplication3\ConsoleApplication3

     目录          0  2016-07-19 17:45  C#调用Java接口演示(郭)\ConsoleApplication3

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

评论

共有 条评论