Exemplo n.º 1
0
        public static ReleaseProfile ToModel(this ReleaseProfileResource resource)
        {
            if (resource == null)
            {
                return(null);
            }

            return(new ReleaseProfile
            {
                Id = resource.Id,

                Required = resource.Required,
                Ignored = resource.Ignored,
                Preferred = resource.Preferred,
                IncludePreferredWhenRenaming = resource.IncludePreferredWhenRenaming,
                Tags = new HashSet <int>(resource.Tags)
            });
        }
Exemplo n.º 2
0
        public static ReleaseProfile ToModel(this ReleaseProfileResource resource)
        {
            if (resource == null)
            {
                return(null);
            }

            return(new ReleaseProfile
            {
                Id = resource.Id,
                Name = resource.Name,
                Enabled = resource.Enabled,
                Required = resource.MapRequired(),
                Ignored = resource.MapIgnored(),
                Preferred = resource.Preferred,
                IncludePreferredWhenRenaming = resource.IncludePreferredWhenRenaming,
                IndexerId = resource.IndexerId,
                Tags = new HashSet <int>(resource.Tags)
            });
        }
Exemplo n.º 3
0
 public static List <string> MapIgnored(this ReleaseProfileResource profile) => ParseArray(profile.Ignored, "ignored");
Exemplo n.º 4
0
 public static List <string> MapRequired(this ReleaseProfileResource profile) => ParseArray(profile.Required, "required");