Пример #1
0
 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);
 }
Пример #2
0
 private string GetDisplayFormat(CommonAttribute displayAttribute)
 {
     return (string) displayAttribute.PositionalArguments.Single().Value;
 }
Пример #3
0
 public string Present(CommonAttribute displayAttribute, IEnumerable<object> arguments)
 {
     return Present(GetDisplayFormat(displayAttribute), arguments);
 }
Пример #4
0
 public string Present(string displayFormat, CommonAttribute subjectAttribute)
 {
     return Present(displayFormat, subjectAttribute.PositionalArguments.Select(x => x.Value));
 }
Пример #5
0
 public string Present(CommonAttribute displayAttribute, CommonAttribute subjectAttribute)
 {
     return Present(GetDisplayFormat(displayAttribute), subjectAttribute);
 }
Пример #6
0
 public string Present(CommonAttribute displayAttribute, IDictionary<string, object> arguments)
 {
     return Present(GetDisplayFormat(displayAttribute), arguments);
 }