Exemple #1
0
        public static Profile WithUniqueNameCandidate(this Profile profile, int maxLength)
        {
            var p = profile.Clone();

            if (string.IsNullOrEmpty(p.OriginalName))
            {
                p.OriginalName    = p.Name;
                p.UniqueNameIndex = 0;
            }

            p.Name = NameCandidate(p.OriginalName, p.UniqueNameIndex, maxLength);

            return(p);
        }
Exemple #2
0
        public static Profile WithStatus(this Profile profile, ProfileStatus value)
        {
            var p = profile.Clone();

            p.Status = value;

            if (value == ProfileStatus.Synced)
            {
                p.OriginalName    = null;
                p.UniqueNameIndex = 0;
            }

            return(p);
        }
Exemple #3
0
 private static Profile Map(Profile profile)
 {
     return(profile.Clone());
 }