public string Present(CommonAttribute displayAttribute, CommonType declaringType, CommonAttribute subjectAttribute) { var dictionary = Tuple.Create("type", (object) declaringType) .Concat(subjectAttribute.PositionalArguments.Select(x => Tuple.Create(x.Position.ToString(), x.Value))) .Concat(subjectAttribute.NamedArguments.Select(x => Tuple.Create(x.Name, x.Value))) .ToDictionary(x => x.Item1, x => x.Item2); return Present(GetDisplayFormat(displayAttribute), dictionary); }
public CommonAttribute( CommonType type, IEnumerable <CommonPositionalArgument> positionalArguments, IEnumerable <CommonNamedArgument> namedArguments) { Type = type; _positionalArguments = positionalArguments.ToList(); _namedArguments = namedArguments.ToList(); }
public CommonAttribute( CommonType type, IEnumerable<CommonPositionalArgument> positionalArguments, IEnumerable<CommonNamedArgument> namedArguments) { _type = type; _positionalArguments = positionalArguments.ToList(); _namedArguments = namedArguments.ToList(); }
public CommonPositionalArgument(int position, CommonType type, object value) { _position = position; _type = type; _value = value; }
public CommonNamedArgument(string name, CommonType type, object value) { _name = name; _type = type; _value = value; }
public CommonPositionalArgument(int position, CommonType type, object value) { Position = position; Type = type; Value = value; }
public CommonMember(string name, CommonType type) { Name = name; Type = type; }