Esempio n. 1
0
        internal static Data ForAssetStatus(AssetStatus status)
        {
            switch (status)
            {
            case AssetStatus.Ignored:
                return(BuildData.ForIgnored());

            case AssetStatus.Private:
                return(BuildData.ForPrivated());

            case AssetStatus.Added:
                return(BuildData.ForAdded());

            case AssetStatus.Checkout:
                return(BuildData.ForCheckedOut());

            case AssetStatus.OutOfDate:
                return(BuildData.ForOutOfDate());

            case AssetStatus.Conflicted:
                return(BuildData.ForConflicted());

            case AssetStatus.DeletedOnServer:
                return(BuildData.ForDeletedOnServer());

            case AssetStatus.Locked:
                return(BuildData.ForLocked());

            case AssetStatus.LockedRemote:
                return(BuildData.ForLockedRemote());
            }

            return(null);
        }
Esempio n. 2
0
        static Data ForConflict(bool isResolved)
        {
            if (isResolved)
            {
                return(BuildData.ForConflictResolved());
            }

            return(BuildData.ForConflicted());
        }
Esempio n. 3
0
        internal static Data ForPendingChange(
            ChangeInfo changeInfo,
            bool isConflict)
        {
            if (isConflict)
            {
                return(BuildData.ForConflicted());
            }

            ItemIconImageType type = ChangeInfoView.
                                     GetIconImageType(changeInfo);

            if (ChangeTypesOperator.AreAllSet(
                    changeInfo.ChangeTypes, ChangeTypes.Added))
            {
                return(BuildData.ForAdded());
            }

            switch (type)
            {
            case ItemIconImageType.Ignored:
                return(BuildData.ForIgnored());

            case ItemIconImageType.Private:
                return(BuildData.ForPrivated());

            case ItemIconImageType.Deleted:
                return(BuildData.ForDeleted());

            case ItemIconImageType.CheckedOut:
                return(BuildData.ForCheckedOut());

            default:
                return(null);
            }
        }