如下写法
- public IEnumerable<object> EnumDependenceCells(IBuilderContext context)
- {
- var result = Enumerable.Empty<object>();
- if (this.CellType.InitValue != null)
- {
- result = result.Union(context.EnumDependenceCellsFromFormula(this.CellType.InitValue) ?? Enumerable.Empty<object>());
- }
- if (this.CellType.DisplayFontSize != null)
- {
- result = result.Union(context.EnumDependenceCellsFromFormula(this.CellType.DisplayFontSize) ?? Enumerable.Empty<object>());
- }
- return result;
- }
复制代码
|