示例#1
0
        static PackageInstallInfo ConvertToPublic(PackageInstallInfoInternal info)
        {
            if (info == null)
            {
                // Can't return null here since unity serialization doesn't support null
                return(new PackageInstallInfo()
                {
                    ReleaseInfo = ConvertToPublic((ReleaseInfoInternal)null)
                });
            }

            var newInfo = new PackageInstallInfo();

            newInfo.InstallDate      = DateTimeToString(info.InstallDate);
            newInfo.InstallDateTicks = info.InstallDate.Ticks;
            newInfo.ReleaseInfo      = ConvertToPublic(info.ReleaseInfo);

            return(newInfo);
        }
示例#2
0
        static PackageInstallInfo ConvertToPublic(PackageInstallInfoInternal info)
        {
            if (info == null)
            {
                // Can't return null here since unity serialization doesn't support null
                return new PackageInstallInfo()
                {
                    ReleaseInfo = ConvertToPublic((ReleaseInfoInternal)null)
                };
            }

            var newInfo = new PackageInstallInfo();

            newInfo.InstallDate = DateTimeToString(info.InstallDate);
            newInfo.InstallDateTicks = info.InstallDate.Ticks;
            newInfo.ReleaseInfo = ConvertToPublic(info.ReleaseInfo);

            return newInfo;
        }