public void Set(GetNATTypeOptions other) { if (other != null) { m_ApiVersion = P2PInterface.GetnattypeApiLatest; } }
/// <summary> /// Get our last-queried NAT-type, if it has been successfully queried. /// </summary> /// <param name="options">Information about what version of the <see cref="GetNATType" /> API is supported</param> /// <param name="outNATType">The queried NAT Type, or unknown if unknown</param> /// <returns> /// <see cref="Result" />::<see cref="Result.Success" /> - if we have cached data /// <see cref="Result" />::<see cref="Result.NotFound" /> - If we do not have queried data cached /// </returns> public Result GetNATType(GetNATTypeOptions options, out NATType outNATType) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <GetNATTypeOptionsInternal, GetNATTypeOptions>(ref optionsAddress, options); outNATType = Helper.GetDefault <NATType>(); var funcResult = EOS_P2P_GetNATType(InnerHandle, optionsAddress, ref outNATType); Helper.TryMarshalDispose(ref optionsAddress); return(funcResult); }