Lnk.ShellItems.ShellBag0X00.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            var sb = new StringBuilder();

            if (ShortName.Length > 0)
            {
                sb.AppendLine($"Short name: {ShortName}");
            }

            if (FtpFolderTime.HasValue)
            {
                sb.AppendLine();
                sb.AppendLine($"FTP folder time: {FtpFolderTime.Value}");
            }

            if (FullUrl != null)
            {
                sb.AppendLine($"Full URL: {FullUrl}");
            }

            //TODO denote custom properties vs standard ones
            if (CreatedOnTime.HasValue)
            {
                sb.AppendLine($"Created On: {CreatedOnTime.Value}");
            }

            //TODO denote custom properties vs standard ones
            if (LastModificationTime.HasValue)
            {
                sb.AppendLine($"Modified On: {LastModificationTime.Value}");
            }

            if (LastAccessTime.HasValue)
            {
                sb.AppendLine(
                    $"Accessed On: {LastAccessTime.Value.ToString(Utils.GetDateTimeFormatWithMilliseconds())}");
            }

            if (PropertyStore.Sheets.Count > 0)
            {
                sb.AppendLine("Property Sheets");

                sb.AppendLine(PropertyStore.ToString());
                sb.AppendLine();
            }

            if (_guids.Count > 0)
            {
                sb.AppendLine("MTP GUIDs");

                foreach (var guid in _guids)
                {
                    sb.AppendLine(guid);
                }
            }
            sb.AppendLine();

            if (_fileSystemName != null)
            {
                sb.AppendLine($"File system name: {_fileSystemName}");
            }
            if (_storageIdName != null)
            {
                sb.AppendLine($"Storage ID name: {_storageIdName}");
            }
            if (_classId != null)
            {
                sb.AppendLine($"Class ID: {_classId}");
            }
            if (_mtpType1GuidName != null)
            {
                sb.AppendLine($"GUID: {_mtpType1GuidName}");
            }


            sb.AppendLine();
            sb.AppendLine(base.ToString());


            return sb.ToString();
        }
    }