Example #1
0
        public static IApplicationInfoProperties SetReplicaTags([NotNull] this IApplicationInfoProperties properties, [NotNull] string replicaName, ReplicaTagKind replicaTagKind, TagCollection tags)
        {
            var propertyKey = new TagsPropertyKey(replicaName, replicaTagKind.ToString());

            if (properties.GetReplicaKindTags(propertyKey).Equals(tags))
            {
                return(properties);
            }

            return(tags?.Count > 0
                ? properties.Set(propertyKey.ToString(), tags.ToString())
                : properties.Remove(propertyKey.ToString()));
        }
Example #2
0
 public static IApplicationInfoProperties SetBlacklist([NotNull] this IApplicationInfoProperties properties, [NotNull] IEnumerable <Uri> blacklist)
 => properties.Set(PropertyConstants.BlacklistProperty, string.Join(PropertyConstants.BlacklistItemSeparator, blacklist));
Example #3
0
 public static IApplicationInfoProperties SetExternalUrl([NotNull] this IApplicationInfoProperties properties, [NotNull] Uri externalUrl)
 => properties.Set(PropertyConstants.ExternalUrlProperty, externalUrl.ToString());