public override void Render(CompilationUnitSource source) { if (RequiredImport != null) { source.Using(RequiredImport); } string vStr = ""; if (Visibility.HasValue) { vStr = Visibility.GetValueOrDefault().ToString().ToLower(CultureInfo.InvariantCulture); } source.AddLine($"{vStr} {Type} {Name} {{ get; set; }}"); }
private static bool GetBoolean(Visibility? value) { return value.GetValueOrDefault() == Visibility.Visible; }