public void Set(SessionDetailsAttribute other) { if (other != null) { m_ApiVersion = SessionDetails.SessiondetailsAttributeApiLatest; Data = other.Data; AdvertisementType = other.AdvertisementType; } }
/// <summary> /// <see cref="CopySessionAttributeByIndex" /> is used to immediately retrieve a copy of session attribution from a given source such as a active session or a search result. /// If the call returns an <see cref="Result.Success" /> result, the out parameter, OutSessionAttribute, must be passed to <see cref="Release" /> to release the memory associated with it. /// <seealso cref="SessionDetailsAttribute" /> /// <seealso cref="SessionDetailsCopySessionAttributeByIndexOptions" /> /// <seealso cref="Release" /> /// </summary> /// <param name="options">Structure containing the input parameters</param> /// <param name="outSessionAttribute">Out parameter used to receive the <see cref="SessionDetailsAttribute" /> structure.</param> /// <returns> /// <see cref="Result.Success" /> if the information is available and passed out in OutSessionAttribute /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter /// <see cref="Result.IncompatibleVersion" /> if the API version passed in is incorrect /// </returns> public Result CopySessionAttributeByIndex(SessionDetailsCopySessionAttributeByIndexOptions options, out SessionDetailsAttribute outSessionAttribute) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <SessionDetailsCopySessionAttributeByIndexOptionsInternal, SessionDetailsCopySessionAttributeByIndexOptions>(ref optionsAddress, options); var outSessionAttributeAddress = System.IntPtr.Zero; var funcResult = EOS_SessionDetails_CopySessionAttributeByIndex(InnerHandle, optionsAddress, ref outSessionAttributeAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet <SessionDetailsAttributeInternal, SessionDetailsAttribute>(outSessionAttributeAddress, out outSessionAttribute)) { EOS_SessionDetails_Attribute_Release(outSessionAttributeAddress); } return(funcResult); }