public static void SetTextTag(this BundleEntry entry, string text)
        {
            var result = new List<Tag>();

            if (entry.Tags != null) result.AddRange(entry.Tags);

            result.RemoveAll(t => Equals(t.Scheme,Tag.FHIRTAGSCHEME_GENERAL) &&
                    (t.Term != null && t.Term.StartsWith(TAG_TERM_TEXT)));

            result.Add(new Tag(TAG_TERM_TEXT + Uri.EscapeUriString(text), Tag.FHIRTAGSCHEME_GENERAL, text));

            entry.Tags = result;
        }
Example #2
0
        public static IEnumerable<Tag> Remove(this IEnumerable<Tag> tags, IEnumerable<Tag> that)
        {
            var result = new List<Tag>();

            result.AddRange(tags);

            if (that != null)
                result.RemoveAll(t => that.HasTag(t.Term, t.Scheme));

            return result;
        }
 public static void RemoveSecurityLabel(this ResourceEntry entry, Uri label)
 {
     var result = new List<Tag>(entry.Tags);
     result.RemoveAll(t => Equals(t, new Tag(label.ToString(), Tag.FHIRTAGSCHEME_SECURITY)));
     entry.Tags = result;
 }
 public static void RemoveProfileAssertion(this ResourceEntry entry, Uri profileUri)
 {
     var result = new List<Tag>(entry.Tags);
     result.RemoveAll(t => Equals(t, new Tag(profileUri.ToString(), Tag.FHIRTAGSCHEME_PROFILE)));
     entry.Tags = result;
 }
        /// <summary>
        /// Prepares the source by reading all files present in the directory (matching the mask, if given)
        /// </summary>
        private void prepareFiles()
        {
            if (_filesPrepared) return;

            IEnumerable<string> masks;
            if (Mask == null)
                masks = new string[] { "*.*" };
            else
                masks = Mask.Split('|').Select(s => s.Trim()).Where(s => !String.IsNullOrEmpty(s));

            // Add files present in the content directory
            var allFiles = new List<string>();

            foreach (var mask in masks)
            {
                allFiles.AddRange(Directory.GetFiles(_contentDirectory, mask, _includeSubs ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly));
            }

            allFiles.RemoveAll(name => Path.GetExtension(name) == ".exe" || Path.GetExtension(name) == ".dll");

            _artifactFilePaths = new List<string>(allFiles);
            _filesPrepared = true;
        }