public void Set(SetPortRangeOptions other) { if (other != null) { m_ApiVersion = P2PInterface.SetportrangeApiLatest; Port = other.Port; MaxAdditionalPortsToTry = other.MaxAdditionalPortsToTry; } }
/// <summary> /// Set configuration options related to network ports. /// </summary> /// <param name="options">Information about network ports config options</param> /// <returns> /// <see cref="Result" />::<see cref="Result.Success" /> - if the options were set successfully /// <see cref="Result" />::<see cref="Result.InvalidParameters" /> - if the options are invalid in some way /// </returns> public Result SetPortRange(SetPortRangeOptions options) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <SetPortRangeOptionsInternal, SetPortRangeOptions>(ref optionsAddress, options); var funcResult = EOS_P2P_SetPortRange(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); return(funcResult); }