protected virtual bool ShouldBuildDescription(BaseDescription description) { if (description == null) { return false; } if (!string.IsNullOrEmpty(description.NotFor)) { var notFor = description.NotFor.Split(';'); if (notFor.Any(_platformTags.ContainsKey)) { return false; } } if (!string.IsNullOrEmpty(description.OnlyFor)) { var onlyFor = description.OnlyFor.Split(';'); if (onlyFor.Any(_platformTags.ContainsKey)) { return true; } return false; } return true; }
protected void Fill(BaseDescription baseDescription) { foreach (var kvp in Properties) { baseDescription.Properties[kvp.Key] = kvp.Value; } baseDescription.OnlyFor = OnlyFor; baseDescription.NotFor = NotFor; }