private static FieldData AssembleField(FieldInfo field) { return(new FieldData() { Type = TypeNaming.GetFullTypeName(field.FieldType) }); }
private static EventData AssembleEvent(EventInfo e) { return(new EventData() { HandlerType = TypeNaming.GetFullTypeName(e.EventHandlerType), IsMulticast = e.IsMulticast }); }
private static PropertyData AssembleProperty(PropertyInfo property) { return(new PropertyData() { Accessors = GetAccessors(property), Type = TypeNaming.GetFullTypeName(property.PropertyType) }); }
private static string[] AssembleConstructor(ConstructorInfo ctor) { var parameters = new List <string>(); foreach (ParameterInfo param in ctor.GetParameters()) { parameters.Add(TypeNaming.GetFullTypeName(param.ParameterType)); } return(parameters.ToArray()); }
private static IndexerData AssembleIndexer(PropertyInfo indexer) { var paramTypes = new List <string>(); foreach (ParameterInfo param in indexer.GetIndexParameters()) { paramTypes.Add(TypeNaming.GetFullTypeName(param.ParameterType)); } return(new IndexerData() { Accessors = GetAccessors(indexer), ItemType = TypeNaming.GetFullTypeName(indexer.PropertyType), Parameters = paramTypes.ToArray() }); }
private static MethodData AssembleMethod(List <MethodInfo> methodOverloads) { var overloads = new List <string[]>(); foreach (MethodInfo overload in methodOverloads) { var parameters = new List <string>(); foreach (ParameterInfo param in overload.GetParameters()) { parameters.Add(TypeNaming.GetFullTypeName(param.ParameterType)); } overloads.Add(parameters.ToArray()); } return(new MethodData() { ReturnType = TypeNaming.GetFullTypeName(methodOverloads[0].ReturnType), OverloadParameters = overloads.ToArray() }); }