Example #1
0
        /// <summary>
        /// Returns metadata for all available DLC
        /// </summary>
        public static IEnumerable <DlcInformation> DlcInformation()
        {
            var appid     = default(AppId);
            var available = false;

            for (int i = 0; i < Internal.GetDLCCount(); i++)
            {
                if (!Internal.BGetDLCDataByIndex(i, ref appid, ref available, out var strVal))
                {
                    continue;
                }

                yield return(new DlcInformation
                {
                    AppId = appid.Value,
                    Name = strVal,
                    Available = available
                });
            }
        }
        /// <summary>
        /// Returns metadata for all available DLC
        /// </summary>
        public static IEnumerable <DlcInformation> DlcInformation()
        {
            var appid     = default(AppId);
            var available = false;

            for (int i = 0; i < Internal.GetDLCCount(); i++)
            {
                var sb = Helpers.TakeStringBuilder();

                if (!Internal.BGetDLCDataByIndex(i, ref appid, ref available, sb, sb.Capacity))
                {
                    continue;
                }

                yield return(new DlcInformation
                {
                    AppId = appid.Value,
                    Name = sb.ToString(),
                    Available = available
                });
            }
        }