/// <summary> /// 对成员导出 /// </summary> /// <param name="parent">父节点</param> /// <param name="member">检测的成员</param> /// <param name="wrapperTypes">包装器类型</param> /// <returns>是否可以被导出</returns> private void Export(Type parent, CodeTypeMember member, WrapperTypes wrapperTypes) { switch (wrapperTypes) { case WrapperTypes.Method: ExportMethod(parent, member); break; case WrapperTypes.Event: ExportEvent(member); break; case WrapperTypes.Property: ExportProperty(member); break; } }
List<Function> GetWrapper(IDictionary<WrapperTypes, List<Function>> dictionary, WrapperTypes key, Function raw) { if (!dictionary.ContainsKey(key)) { dictionary.Add(key, new List<Function>()); if (raw != null) { dictionary[key].Add(new Function(raw)); } } return dictionary[key]; }