예제 #1
0
        /// <summary>
        /// A using statement emulated with a try-finally block.
        /// </summary>
        /// <returns></returns>
        public UsingEmuCodeBody <TThis> UsingEmu(CodeVariableReferenceExpression variableExpr)
        {
            var usingStmt = new UsingEmuCodeBody <TThis>(variableExpr, ThisConverter(this));

            AddStatement(UsingEmuCodeBody <TThis> .GetTryCatchFinallyStatement(usingStmt));
            return(usingStmt);
        }
 public static CodeTryCatchFinallyStatement GetTryCatchFinallyStatement(UsingEmuCodeBody <TParent> codeBody)
 {
     return(codeBody._tryCatchStatement);
 }