Esempio n. 1
0
 public void Set(CopyFileMetadataByFilenameOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = TitleStorageInterface.CopyfilemetadatabyfilenameoptionsApiLatest;
         LocalUserId  = other.LocalUserId;
         Filename     = other.Filename;
     }
 }
        /// <summary>
        /// Create the cached copy of a file's metadata by filename. The metadata will be for the last retrieved or successfully saved version, and will not include any changes that have not
        /// completed writing. The returned pointer must be released by the user when no longer needed.
        /// </summary>
        /// <param name="copyFileMetadataOptions">Object containing properties related to which user is requesting metadata, and for which filename</param>
        /// <param name="outMetadata">A copy of the FileMetadata structure will be set if successful. This data must be released by calling <see cref="Release" />.</param>
        /// <returns>
        /// <see cref="Result" />::<see cref="Result.Success" /> if the metadata is currently cached, otherwise an error result explaining what went wrong
        /// </returns>
        public Result CopyFileMetadataByFilename(CopyFileMetadataByFilenameOptions copyFileMetadataOptions, out FileMetadata outMetadata)
        {
            System.IntPtr copyFileMetadataOptionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <CopyFileMetadataByFilenameOptionsInternal, CopyFileMetadataByFilenameOptions>(ref copyFileMetadataOptionsAddress, copyFileMetadataOptions);

            var outMetadataAddress = System.IntPtr.Zero;

            var funcResult = EOS_PlayerDataStorage_CopyFileMetadataByFilename(InnerHandle, copyFileMetadataOptionsAddress, ref outMetadataAddress);

            Helper.TryMarshalDispose(ref copyFileMetadataOptionsAddress);

            if (Helper.TryMarshalGet <FileMetadataInternal, FileMetadata>(outMetadataAddress, out outMetadata))
            {
                EOS_PlayerDataStorage_FileMetadata_Release(outMetadataAddress);
            }

            return(funcResult);
        }