public static TryStatement ToStatement(TryStatementBuilder builder) { Contract.RequiresNotNull(builder, "builder"); return(new TryStatement( builder._statementSpan, builder._header, builder._tryStatement, (builder._catchBlocks != null) ? CollectionUtils.ToReadOnlyCollection(builder._catchBlocks.ToArray()) : null, builder._finallyStatement )); }
public static Expression ToStatement(TryStatementBuilder builder) { ContractUtils.RequiresNotNull(builder, "builder"); var result = Expression.MakeTry( builder._try, builder._finally, builder._fault, builder._catchBlocks ); if (result.Finally != null || result.Fault != null) { return(Utils.FinallyFlowControl(result)); } return(result); }
public static Expression ToStatement(TryStatementBuilder builder) { ContractUtils.RequiresNotNull(builder, "builder"); var result = Expression.MakeTry( builder._try, builder._finally, builder._fault, builder._catchBlocks ); if (result.Finally != null || result.Fault != null) { return Utils.FinallyFlowControl(result); } return result; }
public static TryStatement ToStatement(TryStatementBuilder builder) { Contract.RequiresNotNull(builder, "builder"); return new TryStatement( builder._statementSpan, builder._header, builder._tryStatement, (builder._catchBlocks != null) ? CollectionUtils.ToReadOnlyCollection(builder._catchBlocks.ToArray()) : null, builder._finallyStatement ); }