PublicKey.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.1
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace RakNet {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class PublicKey : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal PublicKey(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(PublicKey obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~PublicKey() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. RakNetPINVOKE.delete_PublicKey(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public PublicKeyMode publicKeyMode {
  37. set {
  38. RakNetPINVOKE.PublicKey_publicKeyMode_set(swigCPtr, (int)value);
  39. }
  40. get {
  41. PublicKeyMode ret = (PublicKeyMode)RakNetPINVOKE.PublicKey_publicKeyMode_get(swigCPtr);
  42. return ret;
  43. }
  44. }
  45. public string remoteServerPublicKey {
  46. set {
  47. RakNetPINVOKE.PublicKey_remoteServerPublicKey_set(swigCPtr, value);
  48. }
  49. get {
  50. string ret = RakNetPINVOKE.PublicKey_remoteServerPublicKey_get(swigCPtr);
  51. return ret;
  52. }
  53. }
  54. public string myPublicKey {
  55. set {
  56. RakNetPINVOKE.PublicKey_myPublicKey_set(swigCPtr, value);
  57. }
  58. get {
  59. string ret = RakNetPINVOKE.PublicKey_myPublicKey_get(swigCPtr);
  60. return ret;
  61. }
  62. }
  63. public string myPrivateKey {
  64. set {
  65. RakNetPINVOKE.PublicKey_myPrivateKey_set(swigCPtr, value);
  66. }
  67. get {
  68. string ret = RakNetPINVOKE.PublicKey_myPrivateKey_get(swigCPtr);
  69. return ret;
  70. }
  71. }
  72. public PublicKey() : this(RakNetPINVOKE.new_PublicKey(), true) {
  73. }
  74. }
  75. }
粤ICP备19079148号