|
@@ -19,7 +19,9 @@ namespace FlutterCodeGenerator.Map
|
|
|
|
|
|
public List<ComplexModelType> UsedComplexModelTypeList { get; }
|
|
|
|
|
|
- public ServiceMap(Type type)
|
|
|
+ public bool HasMethod => _methodMapList.Count > 0;
|
|
|
+
|
|
|
+ public ServiceMap(Type type, bool isFISLib)
|
|
|
{
|
|
|
ServiceName = type.Name[1..];
|
|
|
UsedComplexModelTypeList = new List<ComplexModelType>();
|
|
@@ -34,7 +36,10 @@ namespace FlutterCodeGenerator.Map
|
|
|
eventMethodList.Add(eventType.AddMethod);
|
|
|
}
|
|
|
methodsList = methodsList.Where(x => !eventMethodList.Contains(x)).ToList();//将Event的Method屏蔽
|
|
|
- methodsList = methodsList.Where(x => !x.CustomAttributes.Any(y => y.AttributeType.FullName == "FISLib.FISAttribute" && y.ConstructorArguments.FirstOrDefault().ArgumentType == typeof(string) && (string)y.ConstructorArguments.FirstOrDefault().Value == "FlutterIgnored")).ToList();//将FISAttribue为FlutterIgnore的屏蔽
|
|
|
+ if (isFISLib)
|
|
|
+ {
|
|
|
+ methodsList = methodsList.Where(x => x.CustomAttributes.Any(y => y.AttributeType.FullName == "FISLib.FISAttribute" && y.ConstructorArguments.FirstOrDefault().ArgumentType == typeof(string) && (string)y.ConstructorArguments.FirstOrDefault().Value == "ForFlutter")).ToList();
|
|
|
+ }
|
|
|
foreach (var method in methodsList)
|
|
|
{
|
|
|
var methodMap = new MethodMap(method);
|