Beispiel #1
0
 /// <include file='../docs.xml'
 /// path='docs/doc[@name="M:PeterO.TrapException.#ctor(System.Int32,PeterO.PrecisionContext,System.Object)"]/*'/>
 public TrapException(int flag, PrecisionContext ctx, Object result)
     : base(String.Empty)
 {
     Object wrappedResult = result;
       var ed = result as EDecimal;
       var er = result as ERational;
       var ef = result as EFloat;
       if (ed != null) {
      wrappedResult = new ExtendedDecimal(ed);
     }
       if (er != null) {
      wrappedResult = new ExtendedRational(er);
     }
       if (ef != null) {
      wrappedResult = new ExtendedFloat(ef);
     }
       this.ete = new ETrapException(
       flag,
       ctx == null ? null : ctx.Ec,
       wrappedResult);
 }
Beispiel #2
0
 internal static TrapException Create(ETrapException ete)
 {
     var ex = new TrapException();
       ex.ete = ete;
       return ex;
 }