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);
 }
Esempio n. 2
0
 public CommonAttribute(
     CommonType type,
     IEnumerable <CommonPositionalArgument> positionalArguments,
     IEnumerable <CommonNamedArgument> namedArguments)
 {
     Type = type;
     _positionalArguments = positionalArguments.ToList();
     _namedArguments      = namedArguments.ToList();
 }
Esempio n. 3
0
 public CommonAttribute(
 CommonType type,
 IEnumerable<CommonPositionalArgument> positionalArguments,
 IEnumerable<CommonNamedArgument> namedArguments)
 {
     _type = type;
       _positionalArguments = positionalArguments.ToList();
       _namedArguments = namedArguments.ToList();
 }
Esempio n. 4
0
 public CommonPositionalArgument(int position, CommonType type, object value)
 {
     _position = position;
       _type = type;
       _value = value;
 }
Esempio n. 5
0
 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;
 }
Esempio n. 7
0
 public CommonNamedArgument(string name, CommonType type, object value)
 {
     _name  = name;
     _type  = type;
     _value = value;
 }
Esempio n. 8
0
 public CommonMember(string name, CommonType type)
 {
     Name = name;
     Type = type;
 }