internal static ReadOnlyCollection <XzaarExpression> ReturnReadOnlyExpressions(BlockExpression provider, ref object collection)
        {
            XzaarExpression tObj = collection as XzaarExpression;

            if (tObj != null)
            {
                // otherwise make sure only one readonly collection ever gets exposed
                Interlocked.CompareExchange(
                    ref collection,
                    new ReadOnlyCollection <XzaarExpression>(new BlockExpressionList(provider, tObj)),
                    tObj
                    );
            }

            // and return what is not guaranteed to be a readonly collection
            return((ReadOnlyCollection <XzaarExpression>)collection);
        }
 internal BlockExpressionList(BlockExpression provider, Expression arg0)
 {
     _block = provider;
     _arg0  = arg0;
 }