private static void RaiseIOAccessPreEvent(IOConnectionInfo ioc, IOConnectionInfo ioc2, IOAccessType t) { if (ioc == null) { Debug.Assert(false); return; } // ioc2 may be null if (IOConnection.IOAccessPre != null) { IOConnectionInfo ioc2Lcl = ((ioc2 != null) ? ioc2.CloneDeep() : null); IOAccessEventArgs e = new IOAccessEventArgs(ioc.CloneDeep(), ioc2Lcl, t); IOConnection.IOAccessPre(null, e); } }